> No. Why should you ever care about whether two integers representing > values are the same object? Your tests should be with `==`, not `is`.
Given this though, what other such beauties are lurking in the interpreter, under the name of 'implementation accidents'? One of the things that drew me to python is the claimed consistency and orthogonality of both language and implementation, not sacrificing clarity for performance, minimizing ad-hoc design hacks and weird gotcha's, etc... In fact, I think my code contains things like "if len(arg) is 0:" and so on, and I feel I should be able to do so given the way python treats (claims to treat?) constant objects, even if I don't care whether the values actually represent the same object. s. -- http://mail.python.org/mailman/listinfo/python-list