Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
from
functools
import
total_ordering
2
class
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
10
class
House:
Callers
1
example.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected