Felipe Almeida Lessa wrote: > Em Ter, 2006-02-28 às 15:17 -0500, Nicolas Fleury escreveu: > >>class A: >> @staticmethod >> def foo(): pass >> bar = foo() > > > # Why not: > > def foo(): pass > > class A: > bar = foo() > foo = staticmethod(foo) >
Well, you could even do: class A: def foo(): pass bar = foo() staticmethod(foo) But it's a bit sad to have a special syntax for decorators then. It's a usability problem, nothing to do with functionality. There's obvious workarounds, but IMHO any user saying "it should just work" is at least partly right. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list