[New-bugs-announce] [issue39822] Use NULL instead of None for empty attrib in C implementation of Element

Serhiy Storchaka report at bugs.python.org
Mon Mar 2 02:39:05 EST 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

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.

----------
components: Extension Modules
messages: 363133
nosy: eli.bendersky, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use NULL instead of None for empty attrib in C implementation of Element
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39822>
_______________________________________


More information about the New-bugs-announce mailing list