[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

Eric V. Smith report at bugs.python.org
Fri Dec 3 04:27:05 EST 2021


Eric V. Smith <eric at trueblade.com> added the comment:

I don't think we'd want to prohibit zero-length namedtuples (or NamedTuples). I've used them, especially when I'm dynamically creating them.

This is just a side effect of how Python works. I don't think there's anything to do here, except maybe mention it in the docs, and I'm not even sure that's a good idea.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45972>
_______________________________________


More information about the Python-bugs-list mailing list