On Tue, Aug 31, 2021 at 09:49:36AM -0400, Calvin Spealman wrote:

> I think the provenance of the "is None" rule comes from before None was a
> guaranteed singleton. In older versions of Python, it was *possible* to
> instantiate more instances of None.

I don't suppose you can show how that works? I've got Python 1.5 and 
Python 0.9 (!) installed and I can't find any way to get a second 
instance.

Python 0.9 doesn't even allow calling the type:

    >>> type(None)()
    Unhandled exception: type error: call of non-function
    Stack backtrace (innermost last):
      File "<stdin>", line 1


Comparison operators don't even work on their own, you need to put them 
in an if statement:

    >>> a = None
    >>> b = eval('None')
    >>> a is b
    Parsing error: file <stdin>, line 1:
    a is b
        ^
    Unhandled exception: run-time error: syntax error


    >>> if a is b:
    ...         print 'true'
    ... 
    true


-- 
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/HBIPALKOGP4NV5SIHX7QB3KVILW6TR3N/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to