Created
November 4, 2014 13:53
-
-
Save lukecampbell/6eec400f01991127482d to your computer and use it in GitHub Desktop.
example.py
This file contains hidden or 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
#!/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