Sometimes a namedtuple, sometimes not #459
Unanswered
NickDarvey
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm seeing an inconsistent behaviour where sometimes when I run my script, my
typing.Tuple[]is detected as a named tuple and others time it is not.That is, specifically, I can attach a debugger and see that this line sometimes evaluates true and sometimes false with zero changes to my script. Fun!
typeguard/src/typeguard/__init__.py
Line 494 in de6ab05
Inspecting
expected_typewhen it's not working:Inspecting
expected_typewhen it is working:If I do a
dir(expected_type)the only difference is the addition of__annotations__at position 0 in the failing case.I'm sure there's not an issue with this library (plus this is using an old release (2.13.3)) but I was wondering if this behaviour sounds at all familiar and if you have any tips for where I should investigate?
Beta Was this translation helpful? Give feedback.
All reactions