This project is about inheritance in Python.
| File | Description |
|---|---|
| 0-lookup.py | Function that returns the list of available attributes and methods of an object |
| 1-my_list.py | Class MyList that inherits from list. Test cases in (tests/1-my_list.txt)[tests/1-my_list.txt] |
| 2-is_same_class.py | Function that returns True if the object is exactly an instance of the specified class ; otherwise False |
| 3-is_kind_of_class.py | Function that returns True if the object is an instance of, or if the object is an instance of a class that inherited from, the specified class; otherwise False |
| 4-inherits_from.py | Function that returns True if the object is an instance of a class that inherited (directly or indirectly) from the specified class ; otherwise False. |
| 5-base_geometry.py | An empty class BaseGeometry. |
| 6-base_geometry.py | Class BaseGeometry (based on 5-base_geometry.py). |
| 7-base_geometry.py | Class BaseGeometry (based on 6-base_geometry.py). Test cases in(tests/7-base_geometry.txt)[tests/7-base_geometry.txt] |
| 8-rectangle.py | Class Rectangle that inherits from BaseGeometry (7-base_geometry.py). |
| 9-rectangle.py | Class Rectangle that inherits from BaseGeometry (7-base_geometry.py). (task based on 8-rectangle.py) |
| 10-square.py | Class Square that inherits from Rectangle (9-rectangle.py) |
| 11-square.py | Class Square that inherits from Rectangle (9-rectangle.py). (task based on 10-square.py). |
| File | Description |
|---|---|
| 100-my_int.py | Class MyInt that inherits from int and has == and != operators inverted. |
| 101-add_attribute.py | Function that adds a new attribute to an object if it’s possible. |
| File | Description |
|---|---|
| tests | test cases to the functions and classes |