[issue45455] Fill func.__doc__ lazily

2021-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: BTW, I think that we spent on issue36521 much more time (especially your time, Inada-san) than it deserved. In normal case 3~5% would look not impressive. But I do not see any immediate drawbacks of making this change, and I afraid that if we do not make i

[issue45455] Fill func.__doc__ lazily

2021-10-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The behavior difference can be eliminated if make func_set_code() calling func_get_doc(). -- nosy: +serhiy.storchaka ___ Python tracker __

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Inada Naoki
Inada Naoki added the comment: Pros: Faster (about 3~5%) faster function creation, when function don't have annotations. When function has annotation, function creation is much slower so performance gain become tiny. Cons: Somewhat backward incompatible: ``` >>> def foo(): "foo" ... >>> d

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +27206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28704 ___ Python tracker ___

[issue45455] Fill func.__doc__ lazily

2021-10-12 Thread Inada Naoki
New submission from Inada Naoki : Move setting `func.__doc__` from PyFunction_New() to __doc__ descriptor, for faster function creation. This issue is spin-off of bpo-36521. -- components: Interpreter Core messages: 403786 nosy: methane priority: normal severity: normal status: open t