En Fri, 12 Dec 2008 19:48:09 -0200, Lie Ryan <lie.1...@gmail.com> escribió:

but if you really want it, simple inheritance might be better anyway,
though not really pythonic:

class MyIfc(object):
    def myMeth1(self): return NotImplemented
    def myMeth2(self): return NotImplemented
class MyClass(MyIfc):
    def myMeth1(self):
        # some implementation
    def myMeth2(self):
        # some implementation

# some might notice the (ab)use of NotImplemented sentinel there

I'd raise NotImplementedError instead.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to