[issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple
16 Mar
2018
16 Mar
'18
5:45 p.m.
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: Would it be worthwhile to show an example of a subclass that overrides or extends __new__? Elsewhere in Python, the usual technique for changing method defaults is for a subclass to override or extend the method in question. class A: def somemeth(self, value: bool = True): print(value) class B(A): def somemeth(self, value: bool = False): super().somemeth(value) ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33077> _______________________________________
2362
Age (days ago)
2362
Last active (days ago)
0 comments
1 participants
participants (1)
-
Raymond Hettinger