On Jan 21, 12:16 am, "J. Peng" <[EMAIL PROTECTED]> wrote:

> Dennis Lee Bieber 写道:
>
> >    The scope of "name" is the entire function; lacking a "global name"
> > statement, AND being on the left side of an assignment, it is a function
> > local name.
>
> Thank you. Does python have so-called 'block scope' object?

No, it doesn't; in most cases that you may care, a name's scope is
either local or global*.

> or if you can,please show me the doc for python's object scope.

http://www.network-theory.co.uk/docs/pytut/PythonScopesandNameSpaces.html


George


* There is also class scope and lexical closures but most likely you
don't have to worry about them for now.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to