Skip to content

Instantly share code, notes, and snippets.

@freakboy3742
Created December 11, 2015 00:38
Show Gist options
  • Save freakboy3742/57747d86ca6906e76ead to your computer and use it in GitHub Desktop.
Save freakboy3742/57747d86ca6906e76ead to your computer and use it in GitHub Desktop.
Python 3 class definitions for fun and profit
class JavaClass:
# Details go here
pass
class JavaInterface:
# Details go here
pass
class MyObject(extends=JavaClass, implements=JavaInterface):
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return "MyObject instance %s, %s" % (self.x, self.y)
obj = MyObject(37, 42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment