Message396706
I think this is a worthwhile improvement.
A few comments on this issue and your PR.
1. We already have qualified names on functions and generators and those can be modified by @decorators.
In those cases, the code object and the function would disagree.
Code objects are immutable, so any thoughts on the usability implications of qualname differing between code object and function?
2. If we are adding a new attribute, it should be at the Python level. The internal layout of the code object is likely to change. (I have no problem with it being visible to tools like austin, just it won't be part of the API.)
3. As it stands, this is beneficial to only a small set of tools, but has a negative impact on memory use.
If we were to leverage the new field to improve the performance of function creation (important for closures) by omitting the qualname (and defaulting to the code object's) then it would benefit everyone. |
|
Date |
User |
Action |
Args |
2021-06-29 08:19:43 | Mark.Shannon | set | recipients:
+ Mark.Shannon, Gabriele Tornetta |
2021-06-29 08:19:43 | Mark.Shannon | set | messageid: <1624954783.63.0.340062409589.issue44530@roundup.psfhosted.org> |
2021-06-29 08:19:43 | Mark.Shannon | link | issue44530 messages |
2021-06-29 08:19:43 | Mark.Shannon | create | |
|