[issue37782] typing.NamedTuple default parameter type issue
Eric V. Smith
report at bugs.python.org
Wed Aug 7 06:11:52 EDT 2019
Eric V. Smith <eric at trueblade.com> added the comment:
example_text is not a field, since you're not giving it a type. It's just a normal class member.
The only field in the NamedTuple is example_int. You can't specify any other field in the call to MyTestedTuple().
To see this, help(MyTestedTuple) starts with:
class MyTestedTuple(builtins.tuple)
| MyTestedTuple(example_int: int = 3)
----------
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37782>
_______________________________________
More information about the Python-bugs-list
mailing list