In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I just read in the 'What's New in Python 2.4' document that the None > data type was converted to a constant: > http://python.org/doc/2.4/whatsnew/node15.html > > """ > # None is now a constant; code that binds a new value to the name > "None" is now a syntax error. > """ > > So, what's the implications of this? I find the lack of explanation a > little puzzling, since I've written code that compares a variable's > type with the 'None' type. For example, a variable would be > initialized to 'None' and if it went through a loop unchanged, I could > determine this at the end by using a conditional type(var) == > type(None). What will type(None) return now? Just out of curiosity, *why* did you test against type(None). What did it buy you compared to the simpler var == None'? In any case, it looks like it does the right thing: Python 2.4 (#1, Jan 17 2005, 14:59:14) [GCC 3.3.3 (NetBSD nb3 20040520)] on netbsd2 Type "help", "copyright", "credits" or "license" for more information. >>> type (None) <type 'NoneType'> -- http://mail.python.org/mailman/listinfo/python-list