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

  • [Python-Dev] PEP 8: Discourage named lambdas?
  • [Python-Dev] PEP 8: Discourage named lambdas?
  • [ 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?

Antoine Pitrou solipsis at pitrou.net
Sun May 4 12:55:38 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 ]

Steven D'Aprano <steve <at> pearwood.info> writes:
> 
> I think you're exaggerating a tad here. Why would you be "very confused" 
> when you see TITLEPATTERN() or foo(callback=TITLEPATTERN)? What else 
> would TITLEPATTERN be but a callable when it's being used as a 
> callable?

The real problem is this example is not the fact that there is a lambda,
but that the variable name doesn't reflect it is a callable. It is common
practice to use verbs for callables, and nouns for non-callables.
Thus I'd expect the variable to be called something like make_title_pattern
rather than TITLEPATTERN (and what's with the ugly allcaps by the way?).


Antoine.



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

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.