tailot's picture
Upload folder using huggingface_hub
f4952b6 verified
Raw History Blame Contribute Delete
635 Bytes
"""Boxes, shutters and a grille: three constructors, three different shapes.
Box is the constructor the constructor-chain card of this bundle claims: it takes
self alone, names no base, and builds without opening the chain. Shutter already
opens the chain first, and Grille takes an argument the rule cannot forward.
"""
class Box:
def __init__(self):
self.sides = 4
self.closed = False
def area(self):
return self.sides * self.sides
class Shutter:
def __init__(self):
super().__init__()
self.open = False
class Grille:
def __init__(self, bars):
self.bars = bars