[Python-ideas] method decorators @final and @override in Python 2.4

Georg Brandl g.brandl at gmx.net
Sun Mar 29 01:03:15 CET 2009

Ben Finney schrieb:
> Péter Szabó <ptspts at gmail.com> writes:
>> If Python had method decorators @final (meaning: it is an error to
>> override this method in any subclass)
> What use case is there for this? It would have to be quite strong to
> override the Python philosophy that “we're all consenting adults
> here”, and that the programmer of the subclass is the one who knows
> best whether a method needs overriding.

I agree. This goes in the same direction as suggesting private attributes.


Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

More information about the Python-ideas mailing list