How do I override a parent class's functions in python?

Posted by wrongusername on Stack Overflow See other posts from Stack Overflow or by wrongusername
Published on 2010-03-20T18:30:38Z Indexed on 2010/03/20 18:41 UTC
Read the original article Hit count: 476

Filed under:
|
|
|
|

I have a private method def __pickSide(self): in a parent class that I would like to override in the child class. However, the child class still calls the inherited def __pickSide(self):. How can I override the function? The child class's function name is exactly the same as the parent's function name.

© Stack Overflow or respective owner

Related posts about python

Related posts about inheritance