Referencing vars, methods and classes by name
Sagari
boyandin at gmail.com
Thu Feb 8 03:18:46 EST 2007
More information about the Python-list mailing list
Thu Feb 8 03:18:46 EST 2007
- Previous message (by thread): Referencing vars, methods and classes by name
- Next message (by thread): Referencing vars, methods and classes by name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greetings, Sorry for a newbiw question: what is a most elegant and/or effective way to reference vars, methods and classes by their names in Python? To illustrate, PHP code: $a = ''b'; $$a = $something; // assign to $b $$a($p1); // call function b($p1) $obj->$a(); // call method b() of the instance $obj What is the Python way of performing the same indirections? References to online docs/articles related to the subject are very welcome. Thank you! Konstantin
- Previous message (by thread): Referencing vars, methods and classes by name
- Next message (by thread): Referencing vars, methods and classes by name
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list