You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2003/06/03 08:53:23 UTC

Re: svn commit: rev 6130 - trunk/tools/cvs2svn

On Tue, Jun 03, 2003 at 12:07:59AM -0500, kfogel@tigris.org wrote:
>...
> +  ### According to my (possibly wrong) understanding of Python scoping
> +  ### rules, we shouldn't have to pass 'logs' as a parameter below,
> +  ### because it's already in-scope for these two inner functions.  But
> +  ### although that seems to be true in Python 2.2.2, we get warnings
> +  ### and errors in 2.1.2:

Up until Python 2.2, there were only three scopes for any block of code:

1) local scope
2) global scope
3) builtin scope

Starting with Python 2.2, you can use variables from enclosing blocks.

So... since our test suite is defined for Python 2.0, you must work with
just the three scopes.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 6130 - trunk/tools/cvs2svn

Posted by kf...@collab.net.
Greg Stein <gs...@lyra.org> writes:
> Up until Python 2.2, there were only three scopes for any block of code:
> 
> 1) local scope
> 2) global scope
> 3) builtin scope
> 
> Starting with Python 2.2, you can use variables from enclosing blocks.
> 
> So... since our test suite is defined for Python 2.0, you must work with
> just the three scopes.

Thanks!

(Found http://www.python.org/peps/pep-0227.html, which goes into some
detail about this.)

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org