This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger
Date 2019-08-26.06:39:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566801588.69.0.745320126697.issue37949@roundup.psfhosted.org>
In-reply-to
Content
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'
History
Date User Action Args
2019-08-26 06:39:48rhettingersetrecipients: + rhettinger
2019-08-26 06:39:48rhettingersetmessageid: <1566801588.69.0.745320126697.issue37949@roundup.psfhosted.org>
2019-08-26 06:39:48rhettingerlinkissue37949 messages
2019-08-26 06:39:48rhettingercreate