Author methane
Recipients Mark.Shannon, corona10, jstasiak, methane, serhiy.storchaka, uriyyo
Date 2020-11-18.00:50:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't like co_annotations.

* It changes PyCode_NewXXX() API.

* Many functions don't have annotations. Adding annotation to code object makes code object fatter even if the function doesn't have annotation.

* Code object is immutable & hashable. Adding annotation to code object makes == and hash() complex.

* We may introduce lazy loading for docstring and annotation in the future.

func.__annotations__ =  ('x', 'int', 'z', 'float', 'return', 'Hoge') is much better because:

* Zero overhead for functions without any annotations.
* After annotation dict is created, the tuple can be released.
Date User Action Args
2020-11-18 00:50:23methanesetrecipients: + methane, Mark.Shannon, serhiy.storchaka, jstasiak, corona10, uriyyo
2020-11-18 00:50:23methanesetmessageid: <>
2020-11-18 00:50:23methanelinkissue42202 messages
2020-11-18 00:50:23methanecreate