[ python-Bugs-896061 ] symtable.Symbol.is_global() is strange

SourceForge.net noreply at sourceforge.net
Sun Aug 1 14:50:49 CEST 2004


Bugs item #896061, was opened at 2004-02-12 22:08
Message generated for change (Comment added) made by astrand
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=896061&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Peter Åstrand (astrand)
Assigned to: Jeremy Hylton (jhylton)
Summary: symtable.Symbol.is_global() is strange

Initial Comment:
The symtable.Symbol.is_global() returns false for
symbols in plain functions:

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, however, it works as expected:

foo = 1

class C:
    def fie(self):
        print foo



----------------------------------------------------------------------

>Comment By: Peter Åstrand (astrand)
Date: 2004-08-01 14:50

Message:
Logged In: YES 
user_id=344921

I would appreciate if someone could take a look at this.
This problem makes the development of pyobfuscate harder:
Basically, I'm guessing how things are supposed to work. Bug
896052 is, of course, also relevant. 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=896061&group_id=5470


More information about the Python-bugs-list mailing list