◐ Shell
clean mode source ↗

gh-144270: make SubElement parent and tag positional-only by NekoAsakura · Pull Request #144845 · python/cpython

@bedevere-app Bot mentioned this pull request

Feb 15, 2026

brijkapadia

serhiy-storchaka

The C accelerator implementations use PyArg_ParseTuple, which
inherently enforces positional-only parameters. The Python fallback
allowed these as keyword arguments, creating a behavioral mismatch.

Make the tag parameter of Element.__init__ and the parent and tag
parameters of SubElement positional-only to align with the C
accelerator.

@NekoAsakura

serhiy-storchaka

@NekoAsakura NekoAsakura deleted the gh-144270-subelement-positional-only branch

March 30, 2026 16:42

maurycy added a commit to maurycy/cpython that referenced this pull request

Mar 30, 2026

clin1234 pushed a commit to clin1234/cpython that referenced this pull request

Apr 16, 2026
…onGH-144845)

The C accelerator implementations use PyArg_ParseTuple, which
inherently enforces positional-only parameters. The Python fallback
allowed these as keyword arguments, creating a behavioral mismatch.

Make the tag parameter of Element.__init__ and the parent and tag
parameters of SubElement positional-only to align with the C
accelerator.

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026
…onGH-144845)

The C accelerator implementations use PyArg_ParseTuple, which
inherently enforces positional-only parameters. The Python fallback
allowed these as keyword arguments, creating a behavioral mismatch.

Make the tag parameter of Element.__init__ and the parent and tag
parameters of SubElement positional-only to align with the C
accelerator.