GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] PEP 8: Discourage named lambdas?

[Python-Dev] PEP 8: Discourage named lambdas?

Samuele Pedroni pedronis at openend.se
Sat May 3 12:35:09 CEST 2008

  • Previous message: [Python-Dev] AST Optimization: Branch Elimination in Generator Functions
  • Next message: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Nick Coghlan wrote:
> Samuele Pedroni wrote:
>> I found only an example in my personal recent code:
>>
>> START = "<!-- *db-payload-start* -->"
>> END = "<!-- *db-payload-end* -->"
>> TITLEPATTERN = lambda s: "<title>%s</title>" % 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.
>
> The way that's written currently, I think I could *very* easily miss 
> the fact that TITLEPATTERN is a callable while glancing over the code 
> (and be very confused if I later saw it being called or passed as a 
> callback).

confused? maybe, "very" seems an overstatement

  • Previous message: [Python-Dev] AST Optimization: Branch Elimination in Generator Functions
  • Next message: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.