Skip to content

Instantly share code, notes, and snippets.

@ooade
Created September 5, 2016 10:58
Show Gist options
  • Save ooade/d52ed55d662814bf1a0d7d2358f3443a to your computer and use it in GitHub Desktop.
Save ooade/d52ed55d662814bf1a0d7d2358f3443a to your computer and use it in GitHub Desktop.
Python Classes ctn'd
class Point3D(object):
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
def __repr__(self):
return "(%d, %d, %d)" % (self.x, self.y, self.z)
my_point = Point3D(1, 2, 3)
print my_point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment