
March 29, 2009
10:45 p.m.
Péter Szabó <ptspts@gmail.com> wrote:
If Python had method decorators @final (meaning: it is an error to override this method in any subclass) and @override (meaning: it is an error not having this method in a superclass), I would use them in my projects (some of them approaching 20 000 lines of Python code) and I'll feel more confident writing object-oriented Python code. Java already has similar decorators or specifiers. Do you think it is a good idea to have these in Python?
No on @final (I've had more trouble with ill-considered Java "final" classes than I can believe), but @override sounds interesting. I can see the point of that. Should do the check at compile time, right? Bill