Lexical scope: converting Perl to Python

Rhodri James rhodri at wildebst.demon.co.uk
Sat Jun 13 16:58:10 EDT 2009


On Sat, 13 Jun 2009 06:02:53 +0100, Andrew Savige <ajsavige at yahoo.com.au>  
wrote:

> What is the Pythonic equivalent of Perl's lexical scope, as
> illustrated by the code snippet above?

The useful (to you) pythonic answer depends rather a lot on
why you want to do something like that.  While you've been
given several possibilities, the "correct" answer might well
be "don't do that at all" :-)

-- 
Rhodri James *-* Wildebeest Herder to the Masses



More information about the Python-list mailing list