Virtual functions are virtually invisible!

rantingrick rantingrick at gmail.com
Sun Jul 17 00:58:47 CEST 2011


On Jul 16, 5:34 pm, Fabio Zadrozny <fabi... at gmail.com> wrote:

> I also like the idea of override annotations and I've created a blog
> post at:http://pydev.blogspot.com/2011/06/overrideimplements-templates-on-pyd...
> to explain how I do use it (and in a way that I think should be
> standard in Python the same way it's in Java).

My hat is off to you Fabio! This is a great way to have the method
clobbering stand out. I can read this code and know EXACTLY what is
going on behind the scenes! And it also has the benefit of being very
compact as apposed to a doc-string.


>From Fabio's blog verbatim:


class A(object):
    def method(self):
        pass

class B(A):

    @overrides(A.method)
    def method(self):
        pass

    @implements(file.write)
    def write(self):
        pass




More information about the Python-list mailing list