Skip to content

Instantly share code, notes, and snippets.

@zenubis
Last active August 29, 2015 13:57
Show Gist options
  • Save zenubis/9824770 to your computer and use it in GitHub Desktop.
Save zenubis/9824770 to your computer and use it in GitHub Desktop.
example of a class in python
class BGM(object):
def __init__(self, _enum, _filename, _loop):
self.enum = _enum;
self.filename = _filename;
self.loop = _loop;
def __repr__(self):
return self.__str__()
def __str__(self):
return "BGM: {0:20s} -> {1:30s} (loop:{2})".format(self.enum, self.filename, self.loop)
class SE(BGM):
def __init__(self, _enum, _filename, _loop):
super(SE,self).__init__(_enum, _filename, _loop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment