Created
December 11, 2015 00:38
-
-
Save freakboy3742/57747d86ca6906e76ead to your computer and use it in GitHub Desktop.
Python 3 class definitions for fun and profit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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