type(None)()

Ramchandra Apte maniandram01 at gmail.com
Thu Aug 16 11:39:51 EDT 2012


Are they the same object

On 16 August 2012 21:01, Stefan Behnel <stefan_ml at behnel.de> wrote:

> 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
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120816/c1057500/attachment.html>


More information about the Python-list mailing list