Author rhettinger
Recipients douglas-raillard-arm, rhettinger
Date 2021-02-02.19:51:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612295469.45.0.205856716818.issue43102@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-02-02 19:51:09rhettingersetrecipients: + rhettinger, douglas-raillard-arm
2021-02-02 19:51:09rhettingersetmessageid: <1612295469.45.0.205856716818.issue43102@roundup.psfhosted.org>
2021-02-02 19:51:09rhettingerlinkissue43102 messages
2021-02-02 19:51:08rhettingercreate