Skip to content

Clarify status of non-identifier unpacked keyword arguments #96397

Closed
@merwok

Description

@merwok

In current CPython, unpacked keyword arguments must be strings but don’t have to be valid identifiers.

Discussion: https://discuss.python.org/t/supporting-or-not-invalid-identifiers-in-kwargs/17147

Messages from Guido (creator of the language) and core developers show that this behaviour is desired and will not be changed.

The issue is whether this is a CPython (stable) implementation detail, in which case docs could be clarified with the fix backported, or if it’s time to make it a guaranteed part of the language, binding for other implementations, starting from 3.11 or 3.12.

I have not found where the doc should be improved; arguments and parameters are discussed in glossary, library reference, etc. but I don’t know where is one complete, authoritative explanation of unpacked keyword params.

Metadata

Metadata

Assignees

Labels

3.11only security fixes3.12only security fixesdocsDocumentation in the Doc dir

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions