Custom namespaces

Michele Simionato michele.simionato at
Fri Aug 7 05:29:35 CEST 2009

On Aug 2, 6:46 am, Chris Rebert <c... at> wrote:
> > Is there any way to install a custom type as a namespace?
> For classes/objects, yes, using metaclasses.
> See the __prepare__() method in PEP 3115:

Here is an example of usage:
(yes, it only works for Python 3+)

More information about the Python-list mailing list