Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Out of curiosity, how did you find this?  Did it arise in the course of trying 
to solve a real problem or were you just reading the code and and thought you 
might do it differently?

Unless there's a real problem, I prefer None because it is immutable (safer), 
because it doesn't incur the time and memory cost of creating a new object, and 
because it does a good job of indicating that builtins are shut-off and not 
intended to be accessed.  The primary reason the line is there at all is to 
make eval() as safe as possible.  There is no public named tuple functionality 
that depends on it, so no user should ever encounter it unless they are just 
investigating implementation details.  In particular, they should never see the 
error message in your post.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43102>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to