How to use dynamic properties? <-- Noob
Bruno Desthuilliers
bruno.desthuilliers at websiteburo.com
Tue Jan 23 03:17:11 EST 2007
More information about the Python-list mailing list
Tue Jan 23 03:17:11 EST 2007
- Previous message (by thread): How to use dynamic properties? <-- Noob
- Next message (by thread): How to use dynamic properties? <-- Noob
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sean Schertell a écrit : > person.name = 'Joe' > person.age = 20 > person.sex = 'm' > > info_I_need = name > > print person.info_I_need > > # How can I make it print 'Joe' ? > print getattr(person, "name")
- Previous message (by thread): How to use dynamic properties? <-- Noob
- Next message (by thread): How to use dynamic properties? <-- Noob
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list