MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / __format__

Method __format__

Solutions/2_4/mutint.py:20–21  ·  view source on GitHub ↗
(self, fmt)

Source from the content-addressed store, hash-verified

18 return f'MutInt({self.value!r})'
19
20 def __format__(self, fmt):
21 return format(self.value, fmt)
22
23 # Implement the "+" operator. Forward operands (MutInt + other)
24 def __add__(self, other):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected