diff --git a/pep-0557.rst b/pep-0557.rst index dfa0c39d8..1e425836c 100644 --- a/pep-0557.rst +++ b/pep-0557.rst @@ -756,6 +756,14 @@ through ``__init__`` (unless you suppress its creation). Which approach is more appropriate will be application-specific, but both approaches are supported. +Another reason for using ``InitVar`` fields is that the class author +can control the order of ``__init__`` parameters. This is especially +important with regular fields and ``InitVar`` fields that have default +values, as all fields with defaults must come after all fields without +defaults. A previous design had all init-only fields coming after +regular fields. This meant that if any field had a default value, +then all init-only fields would have to have defaults values, too. + asdict and astuple function names ---------------------------------