Skip to content

Commit f6d67c8

Browse files
linter
1 parent 1ee8c2a commit f6d67c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/tutorial/classes.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -643,21 +643,21 @@ searching twice in the same class where there is an overlap in the hierarchy.
643643
For examnple::
644644

645645
>>> class Animal:
646-
... def who_am_i(self):
646+
... def whoami(self):
647647
... print("I'm an Animal")
648648
...
649649
>>> class Cat(Animal):
650650
... pass
651-
...
651+
...
652652
>>> class Dog(Animal):
653-
... def who_am_i(self):
653+
... def whoami(self):
654654
... print("I'm a Dog")
655-
...
655+
...
656656
>>> class CatDog(Cat, Dog):
657657
... pass
658658
...
659659
>>> cat_dog = CatDog()
660-
>>> cat_dog.who_am_i()
660+
>>> cat_dog.whoami()
661661
I'm a Dog
662662

663663
In reality it is a little more complicated. Python uses the C3 method

0 commit comments

Comments
 (0)