Hi,
can I reach a hidden method when doing ugly inheritance in python?
class A:
... def spin(self, n): print A, n
...
class B:
... def spin(self, m): print B, m
...
class C(A,B):
... def spin(self, k): print C, k
...
myC = C()
dir(myC)
['__doc__', '__module__', 'spin']
In f.x.
En Thu, 12 Apr 2007 04:18:19 -0300, per9000 [EMAIL PROTECTED] escribió:
Hi,
can I reach a hidden method when doing ugly inheritance in python?
class A:
... def spin(self, n): print A, n
...
class B:
... def spin(self, m): print B, m
...
class C(A,B):
... def spin(self, k):
per9000 a écrit :
Hi,
can I reach a hidden method when doing ugly inheritance in python?
class A:
... def spin(self, n): print A, n
...
class B:
... def spin(self, m): print B, m
...
class C(A,B):
... def spin(self, k): print C, k
...
myC = C()
dir(myC)
['__doc__',
On 12 Apr, 09:42, Gabriel Genellina [EMAIL PROTECTED] wrote:
snip
In f.x. the C-family of languages I guess something like this would
call B.spin:
((B)myC).spin(Lancelot); // almost forgot the ';'
Try this in Python:
B.spin(myC, Lancelot)
snip
Thanks, that was exactly the insight