collections-named-tuple (PYI024): Documented fix is not equivalent #16492
Labels
documentation
Improvements or additions to documentation
help wanted
Contributions especially welcome
Summary
From the doc:
Example
Use instead:
But that's not equivalent! Since the variable name
person
differs from the class namePerson
.For this to be equivalent:
This would be used:
or
I wouldn't recommend that usage. But backwards compatibility is important in libraries, where NamedTuples matter more.
The text was updated successfully, but these errors were encountered: