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: Use NULL instead of None for empty attrib in C implementation of Element
Type: Stage: resolved
Components: Extension Modules Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eli.bendersky, scoder, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-03-02 07:39 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18735 merged serhiy.storchaka, 2020-03-02 07:43
Messages (2)
msg363133 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-03-02 07:39
Currently None is used instead of an empty directory for the attrib field in the C implementation of Element in ElementTree. It is a pure optimization: an empty dict takes a memory and its creation has a cost.

The proposed PR makes NULL be using instead of None. This simplifies the code.
msg363727 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-03-09 13:13
New changeset dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e by Serhiy Storchaka in branch 'master':
bpo-39822: Use NULL instead of None for empty attrib in Element. (GH-18735)
https://github.com/python/cpython/commit/dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e
History
Date User Action Args
2022-04-11 14:59:27adminsetgithub: 84003
2020-03-09 13:14:54serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-03-09 13:13:00serhiy.storchakasetmessages: + msg363727
2020-03-02 07:43:14serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request18092
2020-03-02 07:39:05serhiy.storchakacreate