[EMAIL PROTECTED] wrote:

class Mask(object):
    def m3(self): raise NotImplementedError
    def m4(self): raise NotImplementedError

What's the name of this python design pattern? :-)

Don't know. Perhaps we could call it the FigLeaf pattern
(covering up what you don't want seen)?

There's another possibility that's even more pythonish
(I won't say pythonic, since it's not necessarily
a *recommended* thing to do):

class A:
  m1 = B.__dict__['m1']
  m2 = B.__dict__['m2']
  ...

I propose calling this the Magpie pattern (stealing
the shiny baubles you want and hiding them away in
your own nest).

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

Reply via email to