NoneType and new instances

Terry Reedy tjreedy at udel.edu
Sat Jul 30 09:35:58 EDT 2011


Ethan's proposal was accepted on python-ideas. In Python 3.3, the 
classes for the singletons None, Ellipsis, and NotImplemented will be 
callables that return the singleton.

It turns out that the reason an exception is now raised is that there 
currently is no .__new__ method, so an exception is raised by default. 
.__new__ methods returning the singleton have been added.

Terry Jan Reedy




More information about the Python-list mailing list