Alright, I attempted to post this question yesterday but I don't see it
as showing up, so I apologize in advance if this is a double post.
Python Gurus:
Let me elaborate a bit more on this question. Basically, I want to know
if there is some data structure in python that maps a string
Carl J. Van Arsdall wrote:
Alright, I attempted to post this question yesterday but I don't see it
as showing up, so I apologize in advance if this is a double post.
Python Gurus:
Let me elaborate a bit more on this question. Basically, I want to know
if there is some data structure in
Carl J. Van Arsdall wrote:
Alright, I attempted to post this question yesterday but I don't see it
as showing up, so I apologize in advance if this is a double post.
Python Gurus:
Let me elaborate a bit more on this question. Basically, I want to know
if there is some data structure in
in case you are trying it in the python shell
def foo():return test
...
import __main__
__main__.__dict__[foo]
function foo at 0x40420c6c
__main__.__dict__[foo]()
'test'
otherwise build your own dict with string-function mapping
op = {
plus : lambda x,y:x+y,
minus :