[Python-Dev] Class decorators (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Thu Mar 30 12:38:30 CEST 2006
- Previous message: [Python-Dev] Class decorators
- Next message: [Python-Dev] Class decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Class decorators
- Next message: [Python-Dev] Class decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]