[Python-Dev] Making None a keyword (original) (raw)

Patrick K. O'Brien pobrien@orbtech.com
Fri, 26 Apr 2002 12:11:12 -0500


[Guido van Rossum]

Nothing would change. None would be a literal keyword, but its value in an expression would be the same as before, so None.class would work. Compare "foo".class.

''.class <type 'str'> [].class <type 'list'> {}.class <type 'dict'> True.class <type 'int'> 2.class File "", line 1 2.class ^ SyntaxError: invalid syntax 2.2.class <type 'float'> 2L.class <type 'long'>

Looks like int is one of the few literals that doesn't allow this. But floats and longs do. Hmmm. Just FYI. ;-)


Patrick K. O'Brien Orbtech