◐ Shell
clean mode source ↗

Message 268555 - Python tracker

Someone asked on reddit.  The Misc/NEWS entry for this reads:

Issue #25843: When compiling code, don’t merge constants if they are equal but have a different types. For example, f1, f2 = lambda: 1, lambda: 1.0 is now correctly compiled to two different functions: f1() returns 1 (int) and f2() returns 1.0 (int), even if 1 and 1.0 are equal.

Shouldn't that last part read
 
"and f2() returns 1.0 (float), even if 1 and 1.0 are equal."
                       ^^^^^

As in, f2 returns a float, not an int.

If this is a mistake, let me fix it for 3.5.2 final and I'll merge it back into trunk etc.  If you fix it it wouldn't ship in 3.5.2 final.