Re: object scope

2008-01-20 Thread Gabriel Genellina
En Mon, 21 Jan 2008 03:16:37 -0200, J. Peng <[EMAIL PROTECTED]> escribió: > 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

Re: object scope

2008-01-20 Thread George Sakkis
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 'blo

Re: object scope

2008-01-20 Thread J. Peng
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? or if you can,please show me the doc for python's o

Re: object scope

2008-01-20 Thread J. Peng
J. Peng 写道: > Please see the code below,what's the scope for object "name"? > I thought it should be located in the while block, but it seems not > really,it can be accessed out of while (the db[name] statement).Thanks > in advance. > > sorry the before code seems be disordered,re-posted it. db