Message404536
The PR changes behavior slightly:
def f():
class A:
def __lt__(self, other):
nonlocal x
x += 100
return True
a = A()
x = 1
print(a < x < 10)
x = 1
print(a < x and x < 10)
### Before ###
>>> f()
True
False
### After ###
>>> f()
False
False
So strictly speaking, this would be backwards-incompatible. But morally, I am not totally sure. |
|
Date |
User |
Action |
Args |
2021-10-20 23:02:09 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, akuvfx |
2021-10-20 23:02:09 | Dennis Sweeney | set | messageid: <1634770929.38.0.975224660926.issue45542@roundup.psfhosted.org> |
2021-10-20 23:02:09 | Dennis Sweeney | link | issue45542 messages |
2021-10-20 23:02:09 | Dennis Sweeney | create | |
|