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
# An example of separating behavior from data in Python | |
import copy, new | |
### Class helpers | |
def create_class(__bases__=(object, ), **kw): | |
return new.classobj('FakeClass', __bases__, kw) | |
def combine(*classes): | |
""" Create class hierarchies programatically """ |
NewerOlder