mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-05-17 20:41:08 +00:00
Fixed missing class inheritence
This commit is contained in:
parent
b65a0bad03
commit
4305d8d5ca
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ from abc import ABC, abstractmethod
|
||||||
Then create an abstract class, making sure to add the decorator `@abstractmethod` to the constructor. This prevents the user from instantiating the class.
|
Then create an abstract class, making sure to add the decorator `@abstractmethod` to the constructor. This prevents the user from instantiating the class.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
class Animal:
|
class Animal(ABC):
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
Loading…
Add table
Reference in a new issue