Sam Ruby wrote:

Oh, well, back to coding. BTW, I'm committing the change to opcode issame to make use of the similarly named VTABLE entry as I need this in order to pass a test. Oddly, in Python:

(1,2) == (1,2), (1,2) is (1,2)

(True, False)

1+2 == 1+2, 1+2 is 1+2

(True, True)

But:

>>> 101+2 == 101+2, 101+2 is 101+2
(True, False)

Just forget it.

That are CPython internals ("int interning", "string interning"). No real code is depending on that. Even Python people often give wrong answers on c.l.p, where the actual limits of interned integers are.

If there is a test for that, drop that test (one was testing the exact amount of compare operations in sort() - same weirdness).

- Sam Ruby

leo



Reply via email to