Message350490
Right now, every heap function is given a new annotations dictionary even if annotations aren't used. How about we create these lazily in order to speed-up function creation time, improve start-up time, and save space.
>>> def f(): pass
>>> def g(): return 1
>>> f.__annotations__
{}
>>> g.__annotations__
{}
>>> hex(id(f.__annotations__))
'0x109207e40'
>>> hex(id(g.__annotations__))
'0x1092296c0' |
|
Date |
User |
Action |
Args |
2019-08-26 06:39:48 | rhettinger | set | recipients:
+ rhettinger |
2019-08-26 06:39:48 | rhettinger | set | messageid: <1566801588.69.0.745320126697.issue37949@roundup.psfhosted.org> |
2019-08-26 06:39:48 | rhettinger | link | issue37949 messages |
2019-08-26 06:39:48 | rhettinger | create | |
|