
Le 26 nov. 2016 3:23 PM, "Nick Coghlan" <ncoghlan@gmail.com> a écrit :
On 26 November 2016 at 22:24, France3 <fleblanc50@gmail.com> wrote:
replace base object by default, and when all is checked for end user don't use the flag...
Does it is possible? What do you think about?
There's no need to do this in a base class, since it can be done via external introspection. That introspection could live in at least a couple of different places:
- a class decorator, which checks for unmarked overrides at class definition time - a test utility, that given a module name, imports the module, finds any defined classes, and checks them for unmarked overrides
All an override marker would have to do to enable that introspection is to set a particular attribute on the method definition.
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
I think that it's will be hard to take care of all situations this way... Moreover having a way to rewrite object base class open more perspectives from my point of view.