[Python-Dev] unnamed defs (original) (raw)
IxokaI ixokai at gmail.com
Thu Jul 29 09:39:25 CEST 2004
- Previous message: [Python-Dev] unnamed defs
- Next message: [Python-Dev] unnamed defs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Forgive a lurker, but...
Being unsatisfied with the way lambda works, i wondered what would the python guys think of this:
class X: __mystaticmethod = 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
- Previous message: [Python-Dev] unnamed defs
- Next message: [Python-Dev] unnamed defs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]