Re: [Python-ideas] Please consider adding an overrideable flag to abstractmethod

2019-02-17 Thread Christopher Barker
reposting -- things go to heck when posts are forwarded through google groups :-( -CHB On Sun, Feb 17, 2019 at 8:32 AM Christopher Barker wrote: > On Sun, Feb 17, 2019 at 2:32 AM Neil Girdhar > wrote: > >> Alternatively, the need for an overriding implementation to call super >> could be marke

Re: [Python-ideas] Please consider adding an overrideable flag to abstractmethod

2019-02-17 Thread Neil Girdhar
Alternatively, the need for an overriding implementation to call super could be marked by a different decorator. This would allow linters to check that subclasses call super when they should, which is a very useful check in my opinion. Such a decorator could be called "@overrideable", and cou

[Python-ideas] Please consider adding an overrideable flag to abstractmethod

2019-02-17 Thread Neil Girdhar
Marking a method M declared in C with abstractmethod indicates that M needs to be *implemented* in any subclass D of C for D to be instantiated. We usually think of overriding a method N to mean replacing one implementation in some class E with another in some subclass of E, F. Often, the subc