Closed jasonmyers closed 11 years ago
Seems reasonable. (Although I don't know why you like "choice != -1" better than "choice is not -1" :-) )
Thanks!
Though it may not matter for small integers, I think it is best to avoid the 'is' operator for anything except None, due to the potential gotcha of
>>> a = -1
>>> a is -1
True
>>> a = 1000
>>> a is 1000
False
Ah I see, I knew there was some semantic difference... "is" checks for object identity and "==" for equality, while Python caches small integers. Thanks!
Clicking outside of the jump-to-global list (the second one, if there are multiple matches) selects the last one in the list.
Attaching fix