MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / Room

Class Room

src/8/making_classes_support_comparison_operations/example.py:2–7  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1from functools import total_ordering
2class Room:
3 def __init__(self, name, length, width):
4 self.name = name
5 self.length = length
6 self.width = width
7 self.square_feet = self.length * self.width
8
9@total_ordering
10class House:

Callers 1

example.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected