Meeting, 3 October 2015

We met this Saturday at iBooks and brainstormed some ideas for projects; John is interested in using maps for data visualization. We also talked a little bit about object oriented programming, looking at some of Charlie's older code. Colin patched a bug we found!

This defines a "cell" object with a __str__ method, which defines the string which is displayed when the cell-object is printed:

class cell:
	def __init__(self, state=0):
		self.state = state
	def __str__(self):
		return self.state

But as written, __str__ returns self.state, which is an integer by default; this will raise an error. So, we use the built-in str() function to make sure a string would be returned:

	def __str__(self):
		return str(self.state)

Dulce says the designs generated look like skulls!

Responsive image

Creative Commons License
This site is licensed under a Creative Commons Attribution 4.0 International License.