inheritance python code