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

Carl M. Johnson cmjohnson.mailinglist at gmail.com
Thu Oct 13 07:51:50 CEST 2011


On Oct 12, 2011, at 7:45 PM, David Townshend 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.
> 
> I'm not sure I like the idea of allowing defs without a name, but perhaps its something to think about. 

-1 To me, the names are part of the documentation. The advantage of anonymous blocks is the block part, not the anonymous part.



More information about the Python-ideas mailing list