type(None)()

Stefan Behnel stefan_ml at behnel.de
Thu Aug 16 11:31:16 EDT 2012


Steven D'Aprano, 16.08.2012 15:58:
>>> NoneType raises an error if you try to create a second instance.
> In my opinion, this is a PITA for None and better behaviour would be to 
> return the pre-existing NoneType instance, but I didn't design the 
> language.

The time machine strikes again.

Python 3.3.0b1 (default:f7b59e890e30, Aug 11 2012, 05:30:10)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> type(None)()
>>> print(type(None)())
None

Stefan





More information about the Python-list mailing list