Skip to content

Instantly share code, notes, and snippets.

@munro
Created August 10, 2011 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save munro/1138146 to your computer and use it in GitHub Desktop.
Save munro/1138146 to your computer and use it in GitHub Desktop.
Modular Inheritance
NAME = 'BASE'
def get_name():
return NAME
import base
from base import *
base.NAME = 'FOO'
import foo
if __name__ == '__main__':
print foo.get_name()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment