On 12/14/2013 12:37 PM, Alan Gauld wrote:
I must admit I'd never even thought of checking the __name__ attribute
of a lambda, I'd kind of just assumed it would be empty (or maybe 'anonymous')!

You are right, Alan, in my view.
        any_lambda_func.__name__ == "<anonymous>"
would be a better choice. (And in that case, shortcut imprecise human language --which is just natural and to be expected-- could not end up saying things that a lambda's name is lambda [or things that can be interpreted that way when not fully attentive, which is also natural and to be expected].)

Denis
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to