classmethod() not inherited?

Aahz aahz at
Tue Jan 21 04:40:20 CET 2003

In article <m38yxl8k7y.fsf at>,
Martin v. =?iso-8859-15?q?L=F6wis?= <martin at> wrote:
>class Person:
>  minage = 0
>  maxage = 100
>  def span(self):
>    return self.maxage-self.minage
>  span=classmethod(span)

Why are you using 'self' instead of 'cls'?  I think having the reminder
that span is a classmethod is a Good Idea.
Aahz (aahz at           <*>

"I used to have a .sig but I found it impossible to please everyone..."  --SFJ

More information about the Python-list mailing list