In python how can you extend a class? For example if I have
color.py
class Color: def __init__(self, color): self.color = color def g
Use:
import color class Color(color.Color): ...
If this were Python 2.x, you would also want to derive color.Color from object, to make it a new-style class:
color.Color
object
class Color(object): ...
This is not necessary in Python 3.x.