[Python-Dev] PEP 8: Discourage named lambdas? (original) (raw)
Robert Brewer fumanchu at aminus.org
Sat May 3 17:01:40 CEST 2008
- Previous message: [Python-Dev] PEP 8: Discourage named lambdas?
- Next message: [Python-Dev] PEP 8: Discourage named lambdas?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Samuele Pedroni wrote:
I found only an example in my personal recent code:
START = "" END = "" TITLEPATTERN = lambda s: "%s" % s this three are later used in a very few .find() and .replace() expressions in the same module. I suppose my point is that while I agree it should be discouraged and is really silly to do it for the few chars gain, it can be used to some effect in very rare cases.
i.e. anywhere you need a portable expression (as opposed to a portable set of statements). I have a feeling that if it were named 'expr' instead of 'lambda' we wouldn't be having this discussion.
Robert Brewer fumanchu at aminus.org
- Previous message: [Python-Dev] PEP 8: Discourage named lambdas?
- Next message: [Python-Dev] PEP 8: Discourage named lambdas?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]