A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/061972.html below:

[Python-Dev] Making staticmethod objects callable?

[Python-Dev] Making staticmethod objects callable? [Python-Dev] Making staticmethod objects callable?Guido van Rossum guido at python.org
Thu Mar 2 02:31:57 CET 2006
On 3/1/06, Nicolas Fleury <nidoizo at yahoo.com> wrote:
> The problem is that even after explaining descriptors (which IMHO can be
> a more advanced feature for newbies), you still need a workaround and
> you might end up with (or call __get__):
>
> class A:
>      def foo(): pass
>      bar = foo()
>      foo = staticmethod(foo)
>
> Which I find sad considering all the energy debating @decorators;)

In which context did you find a need for defining a static method and
calling it inside the class definition? I'm guessing that what you're
playing dubious scoping games.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4