Class Methods Vs Any Other Callable

vbgunz vbgunz at gmail.com
Wed May 14 12:25:40 EDT 2008


> > > Instance methods make the most sense. A static method makes sense too
> > > *but* I can see how a class method not only does what a static method
> > > does but how a class method *also* gets the cls reference for free.
>
> > I don't understand the last part - but I certainly agree on the "instance
> > methods make the most sense". But *if* you want a hierarchy
> > of "sensefulness",
>
> > method > classmethod > staticmethod

Sorry I quoted this earlier and meant to respond to it. What I meant
was, might as well use a class method over a static method AND in
doing so, cls is free. I sort of repeated the same thing over and
over. I think my main concern was trying to make sure I could grasp at
least that much.



More information about the Python-list mailing list