[Python-Dev] Class decorators (original) (raw)
Ben.Young at risk.sungard.com Ben.Young at risk.sungard.com
Thu Mar 30 13:04:39 CEST 2006
- Previous message: [Python-Dev] Class decorators
- Next message: [Python-Dev] Class decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 mything(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)
then we could have:
namespace foo: ...
and
interface IFoo(IBar): ...
and your
instance my_thing(MyClass): ...
?
Cheers, Ben
-- Greg
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
- Previous message: [Python-Dev] Class decorators
- Next message: [Python-Dev] Class decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]