Skip to content

Instantly share code, notes, and snippets.

Created July 17, 2012 17:49
Show Gist options
  • Save anonymous/3130810 to your computer and use it in GitHub Desktop.
Save anonymous/3130810 to your computer and use it in GitHub Desktop.
pypyppypypypy
class Point:
''' Point class for representing and manipulating x,y coordinates. '''
def __init__(self, initX, initY):
'''Create a new point at the origin'''
self.x = initX
self.y = initY
p = Point(7, 6)
q = Point(8, 2)
print(p)
print(q)
it prints:
<__main__.Point object at 0x00000000033DD9B0>
<__main__.Point object at 0x00000000033DDA20>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment