Making classes from Metaclasses globally available

Jacek Generowicz jacek.generowicz at cern.ch
Thu Jun 17 02:42:08 EDT 2004


michele.simionato at poste.it (Michele Simionato) writes:

> I do not understand what the problem is ... you can just create a
> class (or instance) called namespace, put it in __builtin__ and call
> all the names in this custom namespace as namespace.myname.

> Maybe you do not like to tweak with __builtin__ (which I can understand);
> another option is to use a dynamically created module to fake a namespace:

> I am sure you thought to this solution too, so what is
> unsatisfactory about it?  Just to know,

Having to specify the namespace explicitly. I want this namespace to
be looked in _automatically_ just like the global and __builtin__
namespaces are, yet I want it to be separate from global and
__builtin__ to provide a way out when names clash.



More information about the Python-list mailing list