On Thu, Nov 17, 2011 at 09:37, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Wed, Nov 16, 2011 at 11:44 PM, Dotan Cohen <dotanco...@gmail.com> wrote: >> Try this (untested): >> >> class C: >> @staticmethod >> def foo(): >> pass >> >> print "inside", C.foo, callable(C.foo) > > If you had tested this, you would have found that you get a NameError, > since C is not yet bound inside the class block where you define it. >
I hadn't tested, I'm at work far from Idle. Just shooting from the hip. For that matter, though, this does work in Java (I'm pretty sure but again, untested right now). -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- http://mail.python.org/mailman/listinfo/python-list