Skip to content

Instantly share code, notes, and snippets.

@lukecampbell
Created November 4, 2014 13:53
Show Gist options
  • Save lukecampbell/6eec400f01991127482d to your computer and use it in GitHub Desktop.
Save lukecampbell/6eec400f01991127482d to your computer and use it in GitHub Desktop.
example.py
#!/usr/bin/env python
'''
somepackage.module
Example Class
'''
from somepackage.base import BaseClass
class Example(BaseClass):
'''
This is an example class
'''
class_attribute = None
another_attribute = 1 # For obscure attributes please document
def __init__(self, *args, **kwargs):
BaseClass.__init__(self, *args, **kwargs)
def do_something(self):
'''
Sets this instance's class_attribute to 1
returns True on success
'''
BaseClass.do_something(self)
self.class_attribute = 1
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment