P
per9000
Hi,
can I reach a hidden method when doing ugly inheritance in python?
.... def spin(self, n): print "A", n
........ def spin(self, m): print "B", m
........ def spin(self, k): print "C", k
....['__doc__', '__module__', 'spin']
In f.x. the C-family of languages I guess something like this would
call B.spin:
((B)myC).spin("Lancelot"); // almost forgot the ';'
Please correct me I am wrong (which I likely am) but as I understand
it this example calls the constructor of int instead of casting it,
right?1337
So is there another way of digging into the past of a class? Or can/
should I create constructors for the classes A, B and C that takes
objects of the other classes?
Or should I have thought about getting unique names before I
implemented the ugly inheritance graph?
/Per
can I reach a hidden method when doing ugly inheritance in python?
.... def spin(self, n): print "A", n
........ def spin(self, m): print "B", m
........ def spin(self, k): print "C", k
....['__doc__', '__module__', 'spin']
In f.x. the C-family of languages I guess something like this would
call B.spin:
((B)myC).spin("Lancelot"); // almost forgot the ';'
Please correct me I am wrong (which I likely am) but as I understand
it this example calls the constructor of int instead of casting it,
right?1337
So is there another way of digging into the past of a class? Or can/
should I create constructors for the classes A, B and C that takes
objects of the other classes?
Or should I have thought about getting unique names before I
implemented the ugly inheritance graph?
/Per