Default expr_context parameters in ast to Load() #118851
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
type-feature
A feature request or enhancement
Feature or enhancement
Proposal:
In #105858, we changed the AST node constructors to raise a DeprecationWarning when any required fields are omitted. Optional fields default to None and list fields default to an empty list. In real-world usage, it emerges that it's often also useful to omit the
ctx
argument to various classes (Attribute, Subscript, Starred, Name, List, Tuple); its value often does not matter, and it's convenient to have it default toast.Load()
.I'd like to backport this to 3.13 since it helps undo a noisy DeprecationWarning.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
python/typeshed#11880 (comment)
Linked PRs
The text was updated successfully, but these errors were encountered: