summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/symbols.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #999042: The Python compiler now handles explict global statementsNeil Schemenauer2009-02-071-4/+5
| | | | | correctly (should be assigned using STORE_GLOBAL opcode). This was done by having the system table differentiate between explict and implicit globals.
* #4578: fix has_key() usage in compiler package.Georg Brandl2008-12-151-10/+8
|
* Fix a bug in the ``compiler`` package that caused invalid code to beNeil Schemenauer2006-08-161-1/+1
| | | | generated for generator expressions.
* Fix errors found by pycheckerNeal Norwitz2006-06-111-1/+1
|
* Use sorted() builtinNeal Norwitz2005-11-251-10/+5
|
* PEP-0318, @decorator-style. In Guido's words:Anthony Baxter2004-08-021-0/+2
| | | | | "@ seems the syntax that everybody can hate equally" Implementation by Mark Russell, from SF #979728.
* Whitespace normalization.Tim Peters2004-07-071-3/+3
|
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-191-0/+41
| | | | | | | | | | | | | | (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
* Fix SF bug [ 788011 ] compiler.compileFile fails on csv.pyJeremy Hylton2003-08-281-1/+6
| | | | Bug fix candidate.
* SF patch [ 597919 ] compiler package and SET_LINENOJeremy Hylton2002-12-311-0/+3
| | | | | | | | | | | | | | | | | A variety of changes from Michael Hudson to get the compiler working with 2.3. The primary change is the handling of SET_LINENO: # The set_lineno() function and the explicit emit() calls for # SET_LINENO below are only used to generate the line number table. # As of Python 2.3, the interpreter does not have a SET_LINENO # instruction. pyassem treats SET_LINENO opcodes as a special case. A few other small changes: - Remove unused code from pycodegen and pyassem. - Fix error handling in parsermodule. When PyParser_SimplerParseString() fails, it sets an exception with detailed info. The parsermodule was clobbering that exception and replacing it was a generic "could not parse string" exception. Keep the original exception.
* Merge of the release22 branch changes back into the trunk.Barry Warsaw2001-12-211-0/+2
|
* Whitespace normalization.Tim Peters2001-10-181-8/+8
|
* The object-being sliced in an assignment to a slice is referenced, notJeremy Hylton2001-09-141-2/+2
| | | | | | | bound. When a Yield() node is visited, assign to the generator attribute of the scope, not the visitor.
* Add generator detection to symbol table.Jeremy Hylton2001-08-291-9/+35
| | | | | Fix bug in handling of statements like "l[x:y] = 2". The visitor was treating this as assignments to l, x, and y!
* Handle private namesJeremy Hylton2001-08-271-7/+3
| | | | | | | | | | | | | | | | | | | (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()
* Fix for sibling nodes that define the same free variableJeremy Hylton2001-08-271-6/+10
| | | | | | | | Evan Simpson's fix. And his explanation: If you defined two nested functions in a row that refer to the same non-global variable, the second one will be generated as though the variable were global.
* Only treat an AugAssign as def if its the target is a Name.Jeremy Hylton2001-04-121-2/+4
| | | | Fixes last bug found with test_scope.py.
* Preliminary support for nested scopesJeremy Hylton2001-04-121-5/+125
| | | | | XXX Still doesn't work right for classes XXX Still doesn't do sufficient error checking
* Add globals to list of names returned by get_names().Jeremy Hylton2001-04-091-7/+13
| | | | | Fix func arg processing to handle args in tuples. In test code, skip names beginning with '.'.
* Add two arguments to Scope constructor, module scope and class nameJeremy Hylton2001-04-091-24/+92
| | | | | | | Add mangling support Add get_children() and add_child() methods to Scope Skip nodes when If test is a false constant Add test code that checks results against symtable module
* Add preliminary module symbol table constructorJeremy Hylton2001-04-091-0/+193