On Sun, Oct 21, 2018 at 06:28:40PM +0200, Andreas Winschu wrote:

> A def function has to be named.

That's a feature, not a lack.

As a general rule of thumb, if the body of a function is complex enough 
to require multiple statements, it is probably complex enough to require 
documentation, testing and a nice name to display in tracebacks.

I wish that somebody would do an objective scientific study on the bug 
density of code using named functions versus anonymous code blocks. My 
intuition (which is, of course, completely subjective) tells me that 
code written in languages that allow and encourage anonymous code blocks 
will have more bugs, simply because coders will be less likely to name 
and test their functions.



-- 
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to