Thanks to everyone for the help. It was very educational to see the different ways of doing this that were illustrated by everyone's examples. To answer one question, yes, I was mentally porting a tcl construct to Python. I ended up using a simple function name dictionary to map the function names into a lookup table. This bought me the flexibility I needed. Once again, thanks to all. -Bruce. In article <20010404.095211.716334471.21458 at mead.troikanetworks.com>, "Bruce Edge" <bedge at troikanetworks.com> wrote: > Can the follwoing be accomplished in Python? > > I want to create a func named "abc": > >>>> name="abc" > >>>> eval ("name") > 'abc' > >>>> def eval ("name") (): > File "<stdin>", line 1 > def eval ("name") (): > ^ > SyntaxError: invalid syntax > > > Thanks, Bruce.
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