Skip to content

Element.itertext() works differently in C and Python implementations #149571

@serhiy-storchaka

Description

@serhiy-storchaka

In the Python implementation it returns empty iterator for Comment and ProcessingInstruction. In the C implementation it emits their content.

>>> import xml.etree.ElementTree as ET
>>> list(ET.Comment('comment').itertext())
['comment']

cc @scoder

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesextension-modulesC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directorytopic-XMLtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions