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

Method __str__

example_code/item_072.py:70–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 self.rows[y % self.height][x % self.width] = state
69
70 def __str__(self):
71 output = ""
72 for row in self.rows:
73 for cell in row:
74 output += cell
75 output += "\n"
76 return output
77
78
79class LockingGrid(Grid):

Callers 1

__str__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected