]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Handle private names
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 27 Aug 2001 22:56:16 +0000 (22:56 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 27 Aug 2001 22:56:16 +0000 (22:56 +0000)
commitc59e22000082722655517942d7662eec5a4a70ce
tree9657ac8cb34b3b319ac0333ae0f5fe0239f8ccd0
parente7d8322630f82d22984987a97c11371ddacba59e
Handle private names

(Hard to believe these were never handled before)

Add misc.mangle() that mangles based on the rules in compile.c.
XXX Need to test the corner cases

Update CodeGenerator with a class_name attribute bound to None.  If a
particular instance is created within a class scope, the instance's
class_name is bound to that class's name.

Add mangle() method to CodeGenerator that mangles if the class_name
has a class_name in it.

Modify the FunctionCodeGenerator family to handle an extra argument--
the class_name.

Wrap all name ops and attrnames in calls to self.mangle()
Lib/compiler/misc.py
Lib/compiler/pycodegen.py
Lib/compiler/symbols.py
Tools/compiler/compiler/misc.py
Tools/compiler/compiler/pycodegen.py
Tools/compiler/compiler/symbols.py