20
Aug
Pitfalls of Python’s ‘is’ operator
I saw this post on Friendfeed, and thought I’d reproduce the code here, because it’s a really interesting Python snippet, and to me, basically says never, ever use the ‘is’ operator. Here’s the snippet that I just reproduced on Python 2.5.2 and 2.6.5: In [1]: a = 500 In [2]: b = 500 In [3]: [...]
Continue Reading →