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.

classification
Title: Minor improvements in asdl_c.py and Python-ast.c
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, serhiy.storchaka, twouters
Priority: normal Keywords: patch

Created on 2019-09-10 07:21 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15824 merged serhiy.storchaka, 2019-09-10 07:23
Messages (4)
msg351582 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-10 07:21
* Use the const qualifier for constant C strings. This will save memory for their copy in a modifiable memory.
* Intern field and attribute names. This will save time, as comparing interned strings is faster.
* Temporary incref a borrowed reference to a list item. Arbitrary Python code can be executed when convert an item to C values. The list containing the item can be modified and the reference can became dead if not incref it.
msg351606 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2019-09-10 10:02
New changeset 43c9731334470573209464b7f67914d386457efc by T. Wouters (Serhiy Storchaka) in branch 'master':
bpo-38083: Minor improvements in asdl_c.py and Python-ast.c. (GH-15824)
https://github.com/python/cpython/commit/43c9731334470573209464b7f67914d386457efc
msg351607 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2019-09-10 10:03
This doesn't feel like a change that's worth backporting to 3.8 at this point. Do you agree? Is there anything left to do for this bug?
msg352010 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-11 18:39
Agree. The third item is actually a bug fix, but it is unlikely that such bug can be exposed in real code.
History
Date User Action Args
2022-04-11 14:59:20adminsetgithub: 82264
2019-09-11 18:39:13serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg352010

stage: patch review -> resolved
2019-09-10 10:03:52twouterssetmessages: + msg351607
2019-09-10 10:02:33twouterssetnosy: + twouters
messages: + msg351606
2019-09-10 07:23:21serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request15473
2019-09-10 07:21:56serhiy.storchakacreate