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

Method add

example_code/item_124_example_06.py:26–27  ·  view source on GitHub ↗
(self, offset: int)

Source from the content-addressed store, hash-verified

24 self.value: int = 0 # Field / variable annotation
25
26 def add(self, offset: int) -> None:
27 value += offset # Oops: forgot "self."
28
29 def get(self) -> int:
30 self.value # Oops: forgot "return"

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected