[Tutor] kwargs to object proporties?
Allen Fowler
allen.fowler at yahoo.com
Wed Mar 19 01:36:03 CET 2008
Hello,
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.
Thanks,
:)
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the Tutor
mailing list