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