[Python-Dev] Class decorators

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 30 12:38:30 CEST 2006


Jack Diederich wrote:

> Classes have a unique property in that they are the easiest way to make
> little namespaces in python.

For a while now, I've been wondering whether it would
be worth having a construct purely for creating little
namespaces, instead of abusing a class for this.

I've been thinking about an 'instance' statement that
creates an instance of a class:

   instance my_thing(MyClass):

     # attribute assignments go here

--
Greg


More information about the Python-Dev mailing list