Issue 896061: symtable.Symbol.is_global() is strange (original) (raw)

Issue896061

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/39933

classification

Title: symtable.Symbol.is_global() is strange
Type: Stage:
Components: None Versions:

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: astrand, benjamin.peterson, jhylton
Priority: normal Keywords:

Created on 2004-02-12 21:08 by astrand, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg19975 - (view) Author: Peter Åstrand (astrand) * (Python committer) Date: 2004-02-12 21:08
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
msg19976 - (view) Author: Peter Åstrand (astrand) * (Python committer) Date: 2004-08-01 12:50
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.
msg71416 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-08-19 13:12
This has finally been fixed.
History
Date User Action Args
2022-04-11 14:56:02 admin set github: 39933
2008-08-19 13:12:15 benjamin.peterson set status: open -> closednosy: + benjamin.petersonresolution: fixedmessages: +
2004-02-12 21:08:25 astrand create