[Tutor] kwargs to object proporties?
allen.fowler at yahoo.com
Wed Mar 19 01:36:03 CET 2008
What's the best way convert keyword arguments to object properties?
Basically, I have a defined list of valid object properties that I'd like to optionally specify in the call to the constructor.
I've got ideas about using __getattr__ but I'm not sure if that's the right way. Plus, that kind of makes it hard to use tab completion of objects in iPython.
Never miss a thing. Make Yahoo your home page.
More information about the Tutor