Message375261
This change makes a difference in semantics (perhaps a good one) in this case:
import pprint
class MyDict(dict):
def __repr__(self):
return 'I do my own thing'*50
if __name__ == '__main__':
d=MyDict()
for i in range(50):
d['a%s'%i] = i
pprint.pprint(d)
Before the change MyDict.__repr__ is ignored and the dict contents are printed. After the change it prints "I do my own thing" 50 times. |
|
Date |
User |
Action |
Args |
2020-08-12 16:37:48 | iritkatriel | set | recipients:
+ iritkatriel, fdrake, palakjha |
2020-08-12 16:37:48 | iritkatriel | set | messageid: <1597250268.06.0.194561017762.issue39994@roundup.psfhosted.org> |
2020-08-12 16:37:48 | iritkatriel | link | issue39994 messages |
2020-08-12 16:37:48 | iritkatriel | create | |
|