Static class methods
Chris Armstrong
carmstro at dynup.net
Sun Mar 4 08:35:30 EST 2001
I have trouble believing that something like this is really needed.
Could you give a real-world example?
In article <rdzo6.154$gc4.80445 at news.pacbell.net>, "Alex Shindich"
<alex at shindich.com> wrote:
> I was
> thinking that a new keyword "unbound" could be used to identify
> functions that belong to a class but do not expect "self" as their first
> attribute. From outside the class "unbound" methods would be invoked by
> specifying the class name -- Foo.my_static_method (). From within the
> class they would work similar to local functions that are defined at the
> class level. The __ trick should work for the "unbound" methods as well
> to allow for creation of private static methods.
--
Chris Armstrong http://twistedmatrix.com/~carmstro carmstro at dynup.net
There is a 90% chance that this message was written when the author's been
awake longer than he should have. Please disregard any senseless drivel.
More information about the Python-list
mailing list