MCPcopy
hub / github.com/fluentpython/example-code-2e / __repr__

Method __repr__

12-seq-hacking/vector_v1.py:100–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

98 return iter(self._components) # <2>
99
100 def __repr__(self):
101 components = reprlib.repr(self._components) # <3>
102 components = components[components.find('['):-1] # <4>
103 return f'Vector({components})'
104
105 def __str__(self):
106 return str(tuple(self))

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected