> From: Brandon J. Van Every [mailto:vanevery at 3DProgrammer.com] > I get the feeling that Python doesn't have anything > resembling a function > pointer? i.e. no way to call a specific function according > to the value a > variable is set to? Might this be what you are looking for? def hello(): return 'hello' def world(): return 'world' functions = {} functions['hll'] = hello functions['wrld'] = world print functions['hll']() print functions['wrld']() regards Max M
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4