All pastes #925421 Raw Edit

Running classmethods at definiti

public text v1 · immutable
·published 2008-03-03 00:14 UTC
rendered paste body
class Foo(object):
    @classmethod
    def announce(cls):
        print cls.name + ' has been defined!'

class Bar(Foo):
    name = 'Baz'
    Foo.announce() # <- how should this be done?