We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ee8c2a commit f6d67c8Copy full SHA for f6d67c8
Doc/tutorial/classes.rst
@@ -643,21 +643,21 @@ searching twice in the same class where there is an overlap in the hierarchy.
643
For examnple::
644
645
>>> class Animal:
646
- ... def who_am_i(self):
+ ... def whoami(self):
647
... print("I'm an Animal")
648
...
649
>>> class Cat(Animal):
650
... pass
651
- ...
+ ...
652
>>> class Dog(Animal):
653
654
... print("I'm a Dog")
655
656
>>> class CatDog(Cat, Dog):
657
658
659
>>> cat_dog = CatDog()
660
- >>> cat_dog.who_am_i()
+ >>> cat_dog.whoami()
661
I'm a Dog
662
663
In reality it is a little more complicated. Python uses the C3 method
0 commit comments