Skip to content

Commit 8221fe4

Browse files
committed
Inheritance
1 parent 16faad4 commit 8221fe4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,11 @@ class Employee(Person):
819819
self.staff_num = staff_num
820820
```
821821

822+
```python
823+
>>> Employee.mro()
824+
[<class 'Employee'>, <class 'Person'>, <class 'object'>]
825+
```
826+
822827
### Comparable
823828
* **If eq() method is not overridden, it returns `'id(self) == id(other)'`, which is the same as `'self is other'`.**
824829
* **That means all objects compare not equal by default.**

0 commit comments

Comments
 (0)