[Tutor] classmethod, staticmethod functions (decorator related)

Huy Ton That huyslogic at gmail.com
Mon Sep 13 04:29:07 CEST 2010

Hm, thanks guys; I just had to verify I was thinking sanely about it. I am
going to pick up classmethods next. Do any of you have common design
patterns for the usage. They are just items I haven't integrated in my
coding, and I want to be certain I'm off on the right foot (:

On Sun, Sep 12, 2010 at 9:01 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:

> "Steven D'Aprano" <steve at pearwood.info> wrote
>  A little more information... static methods are quite common[1] in Java
>> and C++, where people feel the need (or in the case of Java, are forced
>> by the language) to make every function a method.
> static methods in C++ are normally reserved for use as class
> methods (although with the "pollution" from Java that is slowly
> changing). Java OTOH has made them much more common but
> as substitutes for functions as well as true class methods - yeck!
> They are also found in a slightly different guise in Delphi.
> Python classmethods are more powerful and useful than either.
> Alan G.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100912/d9dfd2ea/attachment.html>

More information about the Tutor mailing list