On Mon, Nov 28, 2016 at 1:44 PM, Chris Barker <[email protected]> wrote:
> > On Mon, Nov 28, 2016 at 1:37 PM, Guido van Rossum <[email protected]> > wrote: > > >> They can, and they @override can be bypassed. I don't see that as a >> condemnation of @overload -- it just means that it's not perfect, which is >> fine with me (given that we're talking about monkey-patching here). >> > > sure -- but this all strikes me as kind of like type checking -- there is > a lot of use for robust code, but we don't want it at run-time in the > language. > > 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). -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
