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/2004-July/046533.html below:

[Python-Dev] unnamed defs

[Python-Dev] unnamed defs [Python-Dev] unnamed defsIxokaI ixokai at gmail.com
Thu Jul 29 09:39:25 CEST 2004
Forgive a lurker, but...

> Being unsatisfied with the way lambda works, i wondered what would the python
> guys think of this:
> 
> class X:
> ____my_static_method = staticmethod(def (x, y): {
> ________some statements
> ____})

I can't think of any reason why you wouldn't want to do:

class X:
    def myStaticMethod(x, y):
        some statements
    myStaticMethod = staticmethod(myStaticMethod)

I know its just an example, but I just don't get the allure of
anonymous functions. There's no extra typing in this example, its not
any more clear, and in fact, it looks less clear to me. That doesn't
jump out at me saying 'function definition!'. And in situations where
it may be less typing, its still IMHO always less clear.

--Stephen
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