Does python have an internal data structure with functions imported from a module?

2006-02-17 Thread Carl J. Van Arsdall
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

Re: Does python have an internal data structure with functions imported from a module?

2006-02-17 Thread Georg Brandl
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

Re: Does python have an internal data structure with functions imported from a module?

2006-02-17 Thread Larry Bates
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

Re: Does python have an internal data structure with functions imported from a module?

2006-02-17 Thread Schüle Daniel
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 :