On 2015-05-22 20:14, Laura Creighton wrote:
The first time you discover that in javascript typeof(null) is 'object' and
not 'null' you will scream. I wonder how many home versions of typeof
to replace the system one exist out in the wild?
I don't think that typeof(null) should be 'null'.
If the type of an integer instance is the integer type and the type of
a string instance is the string type, then the type of null should be
the null type, not a null instance.
I suppose that you could consider that what JavaScript is doing is
equivalent to saying in Python that:
None = object()
like you sometimes do when you want a unique sentinel because None
itself would be an acceptable value.
--
https://mail.python.org/mailman/listinfo/python-list