Message313957
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) |
|
Date |
User |
Action |
Args |
2018-03-16 16:45:53 | rhettinger | set | recipients:
+ rhettinger, gvanrossum, eric.smith, docs@python, levkivskyi, Евгений Махмудов |
2018-03-16 16:45:53 | rhettinger | set | messageid: <1521218753.61.0.467229070634.issue33077@psf.upfronthosting.co.za> |
2018-03-16 16:45:53 | rhettinger | link | issue33077 messages |
2018-03-16 16:45:53 | rhettinger | create | |
|