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. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com