[Python-ideas] Statement local functions and classes (aka PEP 3150 is dead, say 'Hi!' to PEP 403)

Nick Coghlan ncoghlan at gmail.com
Thu Oct 13 07:50:58 CEST 2011


On Thu, Oct 13, 2011 at 3:45 PM, David Townshend <aquavitae69 at gmail.com> wrote:
> A question: As I understand it, the function is never actually bound to its
> name, i.e. in your first example the name "report_destruction" doesn't exist
> after the statement. If this is the case, then there seems little point
> assigning a name at all other than for providing a description. In fact,
> assigning a name implies that it is reusable and that the name means
> something.

In a language without exception tracebacks or other forms of
introspection, this would be of greater concern. However, since Python
has both, the lack of meaningful names is a *problem* with lambdas,
not a feature.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list