On Wed, Jan 30, 2013 at 11:06 AM, Larry Hastings <larry@hastings.org> wrote:
Properties are a wonderful facility. But they only work on conventional
objects. Specifically, they *don't* work on module objects. It would be
nice to extend module objects so properties worked there too.
As MAL notes, the issues with such an approach are:
- code executed at module scope
- code in inner scopes that uses "global"
- code that uses globals()
- code that directly modifies a module's __dict__
There is too much code that expects to be able to modify a module's
namespace directly without going through the attribute access
machinery.