
On Thu, Oct 13, 2011 at 3:51 PM, Carl M. Johnson <cmjohnson.mailinglist@gmail.com> wrote:
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.
The "no namespace clashes" part is another benefit. PEP 403 attacks that by omitting the name binding in the current scope rather than by omitting the name entirely. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia