MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / Planet

Class Planet

example_code/item_051.py:388–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386
387print("Example 40")
388class Planet:
389 def __init__(self, distance, size):
390 self.distance = distance
391 self.size = size
392
393 def __repr__(self):
394 return (
395 f"{type(self).__module__}"
396 f"{type(self).__name__}("
397 f"distance={self.distance}, "
398 f"size={self.size})"
399 )
400
401
402print("Example 41")

Callers 1

item_051.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected