Won't use global symbol table?

Duncan Booth duncan at NOSPAMrcp.co.uk
Wed May 23 04:32:21 EDT 2001


"Rob Nikander" <nikander at mindspring.com> wrote in 
news:20010522.194123.1450573622.7698 at kanchenjunga.mindspring.com:

> 
> I thought python looked for a variable in the local symbol table, and if
> it couldn't find it there, went to the global (to the module) symbol
> table.  Why do I have to explicitly tell it to do so in this instance?
> 
Because it looks in the local symbol table and *DOES* find it there in this 
example, it just hasn't been assigned a value yet.


-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list