Friday, 16 August 2013

Can you modify a package's base class in python?

Can you modify a package's base class in python?

I've installed a python package (schematic), which has a number of classes
extended from a base class.
class BaseType(object):
def __init__(self, required=False, default=None ...)
...
class StringType(BaseType):
...
class IntType(BaseType):
...
I would like to be able to modify the BaseType class, so it would accept
additional constructor variables.
I know I could define my own classes based on these, but I was wondering
if there's actually a way in Python to modify just the base class?
Thank you, Ben

No comments:

Post a Comment