Working around a lack of 'goto' in python
Jeff Epler
jepler at unpythonic.net
Wed Mar 10 08:05:28 EST 2004
On Wed, Mar 10, 2004 at 01:36:11PM +0800, Isaac To wrote:
> In Python, function calls and returns are actually quite slow (because they
> has to allocate a dictionary)---just like everything else.
Are you certain that calling a function allocates a dictionary? A
function's locals are stored as indices in a C array unless a function
uses bare exec. I'm not sure what a dictionary is needed for.
Jeff
More information about the Python-list
mailing list