A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-February/042542.html below:

[Python-Dev] symtable module & globals

[Python-Dev] symtable module & globals [Python-Dev] symtable module & globalsPeter Åstrand astrand at lysator.liu.se
Thu Feb 12 15:41:06 EST 2004
I've found the symtable module, which is quite nice. Unfortunately, I 
cannot find any documentation, and the module don't work as I expect:

If the source looks like this:

foo = 1

def fie():
    print foo

Calling is_global() for the "foo" name returns False (using the fie 
functions SymbolTable). 

With a method, is_global() returns true, though:

foo = 1

class C:
    def fie(self):
        print foo

Have I misunderstood something, or is this a bug?


-- 
/Peter Åstrand <astrand at lysator.liu.se>






More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4