[Python-3000] [Python-Dev] Class decorators
Ben.Young at risk.sungard.com
Ben.Young at risk.sungard.com
Thu Mar 30 14:51:12 CEST 2006
python-dev-bounces+python=theyoungfamily.co.uk at python.org wrote on
30/03/2006 13:01:25:
> Ben.Young at risk.sungard.com wrote:
> > python-dev-bounces+python=theyoungfamily.co.uk at python.org wrote on
> > 30/03/2006 11:38:30:
> >
> >> 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
> >
> > Maybe this would be a use for the proposal a while back where:
> >
> > 'statement' name(args):
> > ...
> >
> > implied
> >
> > name = 'statement'("name", args, namespace)
> [...]
>
> I like that generalization (since a class definition statement
> currently does about the same anyway).
>
> However, please post that to the python-3000 list as this would
> be a change for Python 3.
>
Right, sorry. Now forwarded to python-3000!
Cheers,
Ben
> Cheers,
> Georg
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-
> dev/python%40theyoungfamily.co.uk
>
More information about the Python-3000
mailing list