Browse Source

Inheritance

pull/28/head
Jure Šorn 5 years ago
parent
commit
8221fe4bb6
1 changed files with 5 additions and 0 deletions
  1. 5
      README.md

5
README.md

@ -819,6 +819,11 @@ class Employee(Person):
self.staff_num = staff_num
```
```python
>>> Employee.mro()
[<class 'Employee'>, <class 'Person'>, <class 'object'>]
```
### Comparable
* **If eq() method is not overridden, it returns `'id(self) == id(other)'`, which is the same as `'self is other'`.**
* **That means all objects compare not equal by default.**

Loading…
Cancel
Save