On Dec 20, 2012, at 9:59 AM, Paul McNett <[email protected]> wrote:

> Alongside my other large commit to limit imports of subpackages when issuing 
> 'import
> dabo', I'm also changing our 'from settings import *' call to 'import 
> settings', and
> going through all our code and changing code like 'if dabo.eventLogging:' to 
> 'if
> dabo.settings.eventLogging:'.
> 
> The old global import will still happen by default, so this won't break 
> things for
> people immediately.
> 
> However, when I'm done I'm going to need to rebuild the .po files for the
> localization, since the docstring in dObject had an example which referred to
> 'dabo.eventLogging' and I changed that to dabo.settings.eventLogging.

        I don't see the advantage of this change, except for the relation 
between file structure and code references. The settings.py file was created to 
put the configuration stuff for the dabo module all in one place. These 
settings, though, represent attributes of the dabo module, rather than a 
subpackage with a distinct purpose.

        If the goal is to eliminate the 'from settings import *', I would 
prefer moving the code in settings.py into __init__.py. This would not break 
anything, while at the same time removing the objectionable use of 'import *'. 
It would also be semantically more accurate than making the settings distinct 
from the dabo module itself. It would also preserve the behavior of 
settings_override.py in applications.

        Thoughts?


-- Ed Leafe


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to