Re: decorating classes with metaclass

2005-03-14 Thread Simon Percivall
Class decoration was discussed back when (you can search for the thread in python-dev); not as an alias to metaclasses but discussed as having exactly the same semantics as function decoration. Maybe the idea has more merit as being another way of setting the __metaclass__ attribute; on the other h

decorating classes with metaclass

2005-03-14 Thread Bengt Richter
Just wondering whether anyone has discussed using decorator syntax to effect metaclass processing. E.g. @MC class Foo(object): pass would have the same effect as class Foo(object): __metaclass__ = MC pass ISTM fairly analogous to function decoration, just dif