I want my Python class to automatically check the type of value when assigning it to an attribute.
There is enthought's traits module and IPython has a pure python version as its sub module IPython.utils.traitlets. Are there any similar modules? If that module has automatic command line argument parser to set these attribute, that would be better.
EDIT: Thanks for the snippets. But I want Python library. If there exists library to do that, I don't want to reimplement by myself.