This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car: | |
"""A class written to showcase what instance/static/class methods/properties are.""" | |
# All of the methods defined below (including __init__) will be inherited by subclasses. | |
# Here in the __init__ constructor there is a positional parameter, `name`, | |
# followed by two keyword-only arguments (or "kwargs"), `doors` and `max_speed`, | |
# which have default values of 4 and 150, respectively. | |
# In Python, any parameters following a * in a function definition will be kwargs. | |
def __init__(self, name: str = None, *, doors: int = 4, max_speed: int = 150): |