summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
Commit message (Collapse)AuthorAgeFilesLines
* move definition to top of blockBenjamin Peterson2013-05-171-1/+2
|
* complain about "global __class__" in a class body (closes #17983)Benjamin Peterson2013-05-151-0/+6
|
* Issue #16546: make ast.YieldFrom argument mandatory.Mark Dickinson2012-11-251-6/+6
|
* Issue #5765: Apply a hard recursion limit in the compilerNick Coghlan2012-11-041-29/+68
| | | | | | | Previously, excessive nesting in expressions would blow the stack and segfault the interpreter. Now, a hard limit based on the configured recursion limit and a hardcoded scaling factor is applied.
* check return value of _PyUnicode_AsStringBenjamin Peterson2012-10-311-2/+6
|
* Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to ↵Christian Heimes2012-09-121-1/+3
|\ | | | | | | decref 'k' in too many error cases.
| * Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to ↵Christian Heimes2012-09-121-1/+3
| | | | | | | | decref 'k' in too many error cases.
* | Partly revert ad3824a90261 and add comment about reference ownershipChristian Heimes2012-09-121-2/+1
|\ \ | |/
| * Partly revert ad3824a90261 and add comment about reference ownershipChristian Heimes2012-09-121-2/+1
| |
* | Closed reference leak of variable 'k' in function ste_new which wasn't ↵Christian Heimes2012-09-101-1/+2
|\ \ | |/ | | | | decrefed in error cases
| * Closed reference leak of variable 'k' in function ste_new which wasn't ↵Christian Heimes2012-09-101-1/+2
| | | | | | | | decrefed in error cases
* | Close #14857: fix regression in references to PEP 3135 implicit __class__ ↵Nick Coghlan2012-05-271-11/+8
| | | | | | | | closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue
* | make YieldFrom its own distinct from Yield (closes #13780)Benjamin Peterson2012-01-141-2/+6
| |
* | Implement PEP 380 - 'yield from' (closes #11682)Nick Coghlan2012-01-131-19/+0
| |
* | Issue #13343: Fix a SystemError when a lambda expression uses a globalAmaury Forgeot d'Arc2011-11-041-0/+3
|\ \ | |/ | | | | | | variable in the default value of a keyword-only argument: (lambda *, arg=GLOBAL_NAME: None)
| * Issue #13343: Fix a SystemError when a lambda expression uses a globalAmaury Forgeot d'Arc2011-11-041-0/+3
| | | | | | | | | | variable in the default value of a keyword-only argument: (lambda *, arg=GLOBAL_NAME: None)
* | Implement PEP 393.Martin v. Löwis2011-09-281-4/+4
| |
* | fix possibily uninitialized memory usage (closes #12474)Benjamin Peterson2011-07-021-2/+2
| |
* | store the current scope on the stack right awayBenjamin Peterson2011-06-301-21/+18
| |
* | remove VISIT_*_IN_BLOCK macrosBenjamin Peterson2011-06-291-41/+10
| | | | | | | | | | These are pointless because on error, all blocks will be finalized by symtable_dealloc.
* | merge 3.2Benjamin Peterson2011-06-211-6/+6
|\ \ | |/
| * fix indentationBenjamin Peterson2011-06-211-6/+6
| |
* | use a invalid name for the __class__ closure for super() (closes #12370)Benjamin Peterson2011-06-201-8/+11
| | | | | | | | | | This prevents the assignment of __class__ in the class body from breaking super. (Although a determined person could do locals()["@__class__"] = 4)
* | unify TryExcept and TryFinally (closes #12199)Benjamin Peterson2011-05-291-8/+5
| |
* | reflect with statements with multiple items in the AST (closes #12106)Benjamin Peterson2011-05-271-4/+12
| |
* | Issue #9904: fix and clarify some comments + fix indentation in symtable codeEli Bendersky2011-04-101-4/+4
|/
* fix uninitialized struct member #10152Benjamin Peterson2010-10-201-0/+1
|
* don't identify the toplevel namespace by name #9997Benjamin Peterson2010-10-161-1/+1
|
* add column offset to all syntax errorsBenjamin Peterson2010-09-201-24/+37
|
* revert unintended changesBenjamin Peterson2010-07-201-9/+2
|
* move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson2010-07-201-2/+9
|
* Merged revisions 81906 via svnmerge fromBenjamin Peterson2010-06-111-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81906 | benjamin.peterson | 2010-06-11 16:40:37 -0500 (Fri, 11 Jun 2010) | 1 line different spellings are just unacceptable ........
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1307/+1307
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 76423-76424 via svnmerge fromBenjamin Peterson2009-11-201-3/+2
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76423 | benjamin.peterson | 2009-11-19 19:15:53 -0600 (Thu, 19 Nov 2009) | 1 line provide line number for lambdas ........ r76424 | benjamin.peterson | 2009-11-19 19:16:58 -0600 (Thu, 19 Nov 2009) | 1 line genexps have linenos ........
* Merged revisions ↵Benjamin Peterson2009-06-281-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73376 | benjamin.peterson | 2009-06-11 17:29:23 -0500 (Thu, 11 Jun 2009) | 1 line remove check for case handled in sub-function ........ r73393 | alexandre.vassalotti | 2009-06-12 13:56:57 -0500 (Fri, 12 Jun 2009) | 2 lines Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini. ........ r73398 | alexandre.vassalotti | 2009-06-12 15:57:12 -0500 (Fri, 12 Jun 2009) | 3 lines Add const qualifier to PyErr_SetFromErrnoWithFilename and to PyErr_SetFromErrnoWithUnicodeFilename. ........ r73400 | alexandre.vassalotti | 2009-06-12 16:43:47 -0500 (Fri, 12 Jun 2009) | 2 lines Delete outdated make file for building the parser with MSVC 6. ........ r73404 | benjamin.peterson | 2009-06-12 20:40:00 -0500 (Fri, 12 Jun 2009) | 1 line keep the slice.step field as NULL if no step expression is given ........ r73405 | benjamin.peterson | 2009-06-12 22:46:30 -0500 (Fri, 12 Jun 2009) | 1 line prevent import statements from assigning to None ........ r73409 | benjamin.peterson | 2009-06-13 08:06:21 -0500 (Sat, 13 Jun 2009) | 1 line allow importing from a module named None if it has an 'as' clause ........ r73419 | benjamin.peterson | 2009-06-13 11:19:19 -0500 (Sat, 13 Jun 2009) | 1 line set Print.values to NULL if there are no values ........ r73420 | benjamin.peterson | 2009-06-13 12:08:53 -0500 (Sat, 13 Jun 2009) | 1 line give a better error message when deleting () ........ r73421 | benjamin.peterson | 2009-06-13 15:23:33 -0500 (Sat, 13 Jun 2009) | 1 line when no module is given in a 'from' relative import, make ImportFrom.module NULL ........ r73432 | amaury.forgeotdarc | 2009-06-14 16:20:40 -0500 (Sun, 14 Jun 2009) | 3 lines #6227: Because of a wrong indentation, the test was not testing what it should. Ensure that the snippet in doctest_aliases actually contains aliases. ........ r73457 | benjamin.peterson | 2009-06-16 18:13:09 -0500 (Tue, 16 Jun 2009) | 1 line add underscores ........ r73460 | benjamin.peterson | 2009-06-16 22:23:04 -0500 (Tue, 16 Jun 2009) | 1 line remove unused 'encoding' member from the compiler struct ........ r73485 | benjamin.peterson | 2009-06-19 17:07:47 -0500 (Fri, 19 Jun 2009) | 1 line remove duplicate test ........ r73486 | benjamin.peterson | 2009-06-19 17:09:17 -0500 (Fri, 19 Jun 2009) | 1 line add missing assertion #6313 ........ r73488 | benjamin.peterson | 2009-06-19 17:16:28 -0500 (Fri, 19 Jun 2009) | 1 line show that this one isn't used ........ r73489 | benjamin.peterson | 2009-06-19 17:21:12 -0500 (Fri, 19 Jun 2009) | 1 line use closures ........ r73501 | benjamin.peterson | 2009-06-21 18:01:07 -0500 (Sun, 21 Jun 2009) | 1 line don't need to add the name 'lambda' as assigned ........ r73502 | benjamin.peterson | 2009-06-21 18:03:36 -0500 (Sun, 21 Jun 2009) | 1 line remove tmpname support since it's no longer used ........ r73513 | benjamin.peterson | 2009-06-22 20:18:57 -0500 (Mon, 22 Jun 2009) | 1 line fix grammar ........ r73514 | benjamin.peterson | 2009-06-22 22:01:56 -0500 (Mon, 22 Jun 2009) | 1 line remove some unused symtable constants ........
* fix error handling of PyNumber_InPlaceOr #6000Benjamin Peterson2009-05-121-16/+26
|
* remove unused variableBenjamin Peterson2009-04-021-1/+0
|
* rewrite error handling to make senseBenjamin Peterson2009-04-021-3/+7
|
* fix ref leaksBenjamin Peterson2009-04-021-0/+2
|
* Merged revisions 70801,70809 via svnmerge fromJeremy Hylton2009-03-311-20/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk The merge ran into a lot of conflicts because dicts were replaced with sets in the Python 3 version of the symbol table. ........ r70801 | jeremy.hylton | 2009-03-31 09:17:03 -0400 (Tue, 31 Mar 2009) | 3 lines Add is_declared_global() which distinguishes between implicit and explicit global variables. ........ r70809 | jeremy.hylton | 2009-03-31 09:48:15 -0400 (Tue, 31 Mar 2009) | 14 lines Global statements from one function leaked into parallel functions. Re http://bugs.python.org/issue4315 The symbol table used the same name dictionaries to recursively analyze each of its child blocks, even though the dictionaries are modified during analysis. The fix is to create new temporary dictionaries via the analyze_child_block(). The only information that needs to propagate back up is the names of the free variables. Add more comments and break out a helper function. This code doesn't get any easier to understand when you only look at it once a year. ........
* instead of hacking __locals__ in during bytecode generation, put it in the ↵Benjamin Peterson2009-03-031-2/+5
| | | | symtable
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-1/+1
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Merged revisions 65715,65724,65726,65732,65736-65739,65775 via svnmerge fromBenjamin Peterson2008-08-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65715 | benjamin.peterson | 2008-08-16 16:04:16 -0500 (Sat, 16 Aug 2008) | 1 line add some documentation for symtable ........ r65724 | benjamin.peterson | 2008-08-16 17:11:33 -0500 (Sat, 16 Aug 2008) | 2 lines include filename and line number in SyntaxError ........ r65726 | georg.brandl | 2008-08-16 17:37:05 -0500 (Sat, 16 Aug 2008) | 2 lines Review symtable docs. ........ r65732 | benjamin.peterson | 2008-08-16 18:29:40 -0500 (Sat, 16 Aug 2008) | 1 line PySTEntry's constructor is static; there's no point in a fancy API name ........ r65736 | benjamin.peterson | 2008-08-16 20:09:17 -0500 (Sat, 16 Aug 2008) | 1 line expose PySTEntry.nested so the symtable module will work ........ r65737 | benjamin.peterson | 2008-08-16 20:17:15 -0500 (Sat, 16 Aug 2008) | 1 line a few improvements ........ r65738 | benjamin.peterson | 2008-08-16 20:27:30 -0500 (Sat, 16 Aug 2008) | 1 line fix compile errors ........ r65739 | benjamin.peterson | 2008-08-16 21:23:43 -0500 (Sat, 16 Aug 2008) | 1 line uhh PySTEntry->ste_unoptimized has to be exposed too ........ r65775 | benjamin.peterson | 2008-08-17 12:13:26 -0500 (Sun, 17 Aug 2008) | 5 lines get the symtable module back in working order - Fix broken functions - Add (hopefully) extensive tests - Modernize a little ........
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-2/+2
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.
* Merged revisions 62047 via svnmerge fromNeal Norwitz2008-03-311-5/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r62047 | georg.brandl | 2008-03-29 23:40:17 -0700 (Sat, 29 Mar 2008) | 2 lines Patch #2511: Give the "excepthandler" AST item proper attributes by making it a Sum. ........
* Merged revisions 61404-61407 via svnmerge fromChristian Heimes2008-03-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r61404 | raymond.hettinger | 2008-03-15 21:02:04 +0100 (Sat, 15 Mar 2008) | 17 lines Removed Exact/Inexact after discussion with Yasskin. Unlike Scheme where exactness is implemented as taints, the Python implementation associated exactness with data types. This created inheritance issues (making an exact subclass of floats would result in the subclass having both an explicit Exact registration and an inherited Inexact registration). This was a problem for the decimal module which was designed to span both exact and inexact arithmetic. There was also a question of use cases and no examples were found where ABCs for exactness could be used to improve code. One other issue was having separate tags for both the affirmative and negative cases. This is at odds with the approach taken elsewhere in the Python (i.e. we don't have an ABC both Hashable and Unhashable). ........ r61405 | raymond.hettinger | 2008-03-15 21:37:50 +0100 (Sat, 15 Mar 2008) | 1 line Zap one more use of Exact/Inexact. ........ r61406 | neal.norwitz | 2008-03-15 23:03:18 +0100 (Sat, 15 Mar 2008) | 9 lines Add a warning for code like: assert (0, 'message') An empty tuple does not create a warning. While questionable usage: assert (), 'message' should not display a warning. Tested manually. The warning message could be improved. Feel free to update it. ........ r61407 | neal.norwitz | 2008-03-15 23:36:01 +0100 (Sat, 15 Mar 2008) | 1 line Handle memory allocation failure. Found by Adam Olsen ........
* Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases ↵Christian Heimes2007-12-021-22/+22
| | | | in intobject.h
* Bug #1356: Avoid using the C99 keyword 'restrict'.Martin v. Löwis2007-10-291-4/+4
|
* Issue #1066: implement PEP 3109, 2/3 of PEP 3134.Collin Winter2007-08-311-7/+5
|
* Use unicode for error messages of duplicate argsNeal Norwitz2007-08-241-3/+2
|