On Mon, Nov 28, 2016 at 1:50 PM, Guido van Rossum <gu...@python.org> wrote:

> Also -- the ship has kinda sailed on this - maybe a @not_override would
>> make more sense.
>>
>> Isn't the goal to make sure you don't accidentally override a method?
>> saying "I know I'm overriding this" is less useful than "I'm not intending
>> to override anything here"
>>
>
> I think you're fighting a straw man. I never said @override should be
> added to the language. I said that it would be useful to have a 3rd party
> metaclass or a class decorator that implements it which packages may
> voluntarily use to constrain their subclasses (or their own uses --
> different designs are possible).
>

I know -- I just happened to add that to a reply to you...

That was for the OP, or anyone else thinking of writing such a thing.

And I still think it would better be added to a linting tool than at
run-time -- but let whoever writes it figure that out.

-CHB


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to