Hallöchen! Steven D'Aprano writes:
> On Sat, 26 Jul 2008 11:08:12 +0200, Nikolaus Rath wrote: > >> [...] >> >> so 'self' should *automatically* only be inserted in the function >> declaration, and *manually* be typed for attributes. > > > That idea might have worked many years ago, but not now. The > problem is, what happens here? > > class Foo(object): > def foo(self, arg): > self.whatever = arg + 1 > @classmethod > def cfoo(cls, arg): > cls.whatever = arg - 1 > @staticmethod > def sfoo(arg): > print arg See <news:[EMAIL PROTECTED]>. It is only added to non-decorated methods within a class. This implies that you can switch this mechanism off with a noop decorator. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list