خرید بک لینک

Vote count: 0

This might not be the right way to use this but bare with me.

I've created a "borg-ton" class in my Python3.4 app where I add all my settings through out the app's run time. This enables me to have a single point of accessing these values in a hierarchically maer, removing duplicated settings and saving all settings to a dump file in case of crash.

So I can access my settings using dot notation which is very convenient fx.

if self.setting.lvl1.lvl2.mySetting == someValue: 

However these settings are created during run time and as such there are not type hinting.

Is there a way to enter type hinting dynamically. I know that I might have to run my app once to build such a file but that would also be ok.

Essentially i think it boils down to. can you make type-hinting into a dict.

I am using pyCharm as my IDE.

Regard

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 29 فروردين 1395 ساعت: 16:21

صفحه بندی