[docs] [issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

Raymond Hettinger report at bugs.python.org
Fri Mar 16 12:45:53 EDT 2018

Raymond Hettinger <raymond.hettinger at 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):

    class B(A):
        def somemeth(self, value: bool = False):

nosy: +rhettinger

Python tracker <report at bugs.python.org>

More information about the docs mailing list