You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on trying out NamedTuple from typing with mypy, and I ran into an error claiming my tuple has no attribute "_replace" when I try to call _replace.
Is this what you're talking about here, or am I running into a different problem?
Our policy is to close bugs when the fix lands in the repo. So if this issue is fixed in the repo it should be closed now. (As the originator you should be able to.)
Activity
dlinnemeyer commentedon Sep 22, 2016
I'm working on trying out NamedTuple from typing with mypy, and I ran into an error claiming my tuple has no attribute "_replace" when I try to call _replace.
Is this what you're talking about here, or am I running into a different problem?
elazarg commentedon Sep 22, 2016
What version of mypy do you use? This sounds like an old bug that should have been fixed. Can you post an example code?
dlinnemeyer commentedon Sep 22, 2016
0.4.4. I'll work on some example code quickly.
dlinnemeyer commentedon Sep 22, 2016
I'm getting this error:
test.py: note: In function "do_something":
test.py:9: error: "Foo" has no attribute "_replace"
gvanrossum commentedon Sep 22, 2016
elazarg commentedon Sep 22, 2016
No it was fixed but not released yet.
gvanrossum commentedon Sep 22, 2016
Our policy is to close bugs when the fix lands in the repo. So if this issue is fixed in the repo it should be closed now. (As the originator you should be able to.)
dlinnemeyer commentedon Sep 22, 2016
You were right. Installing directly from git doesn't give any errors.
elazarg commentedon Sep 22, 2016
@gvanrossum please don't close this issue. It is about other problems, not yet solved.
gvanrossum commentedon Sep 22, 2016
Sorry!
selftype in namedtuple methods (#2408)
Selftype with TupleType (#2436)
emmatyping commentedon Dec 27, 2024
namedtuple is no longer an experimental mypy concept, I think this can be closed. Any work left belongs in python/typing or CPython :)