DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python get object attribute by string
x = getattr(t, 'attr1') setattr(t, 'attr1', 21)
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#object
#attribute
#string
ADD COMMENT
Topic
COMMENT
Name
6+8 =
Submit