[Python-ideas] Decorator to avoid a mistake
Chris Barker
chris.barker at noaa.gov
Mon Nov 28 16:44:39 EST 2016
On Mon, Nov 28, 2016 at 1:37 PM, Guido van Rossum <guido at python.org> 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"
-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.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161128/569ef99d/attachment.html>
More information about the Python-ideas
mailing list