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

Method __str__

example_code/item_073.py:134–140  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

132 self.rows[y % self.height][x % self.width] = state
133
134 def __str__(self):
135 output = ""
136 for row in self.rows:
137 for cell in row:
138 output += cell
139 output += "\n"
140 return output
141
142
143def count_neighbors(y, x, get_cell):

Callers 1

__str__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected