
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