Alexandre Vassalotti
b646547bb4
Issue #2333 : Backport set and dict comprehensions syntax.
2010-01-11 22:36:12 +00:00
Alexandre Vassalotti
ee936a2130
Issue #2335 : Backport set literals syntax from Python 3.x.
2010-01-09 23:35:54 +00:00
Georg Brandl
944f684ce6
Allow multiple context managers in one with statement, as proposed
...
in http://codereview.appspot.com/53094 and accepted by Guido.
The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
2009-05-25 21:02:56 +00:00
Georg Brandl
2d2fe572a4
#4578 : fix has_key() usage in compiler package.
2008-12-15 08:58:59 +00:00
Amaury Forgeot d'Arc
67f24f1ed6
follow-up of issue3473: update the compiler package to recognize the new syntax.
2008-08-20 00:08:47 +00:00
Facundo Batista
4219da4bd0
Issue 2117. Update compiler module to handle class decorators.
...
Thanks Thomas Herve
2008-02-25 18:06:00 +00:00
Christian Heimes
c5f05e45cf
Patch #2167 from calvin: Remove unused imports
2008-02-23 17:40:11 +00:00
Collin Winter
6290305e67
Backport PEP 3110's new 'except' syntax to 2.6.
2007-05-18 23:11:24 +00:00
Georg Brandl
ab49684f55
Patch #1638243 : the compiler package is now able to correctly compile
...
a with statement; previously, executing code containing a with statement
compiled by the compiler package crashed the interpreter.
2007-01-27 17:43:02 +00:00
Georg Brandl
edd9b0dfb3
Bug #1441397 : The compiler module now recognizes module and function
...
docstrings correctly as it did in Python 2.4.
2006-07-29 09:33:26 +00:00
Tim Peters
3249d00f4d
Whitespace normalization.
2006-06-27 11:52:49 +00:00
Georg Brandl
c3f49ca558
Set lineno correctly on list, tuple and dict literals.
2006-06-22 14:46:17 +00:00
Georg Brandl
ad29e637d8
fix [ 1509132 ] compiler module builds incorrect AST for TryExceptFinally
2006-06-21 17:45:17 +00:00
Neal Norwitz
6aaccc6b55
Fix errors found by pychecker
2006-06-11 08:35:14 +00:00
Georg Brandl
1bb6230930
Bug #1385040 : don't allow "def foo(a=1, b): pass" in the compiler package.
2006-05-03 18:18:32 +00:00
Neal Norwitz
b902f4e401
Use absolute imports
2006-04-03 04:45:34 +00:00
Thomas Wouters
fa0cf4f3ae
Add support for absolute/relative imports and if/else expressions:
...
- regenerate ast.py
- add future flags for absolute-import and with-statement so they
(hopefully) properly get set in code-object flags
- try out if/else expressions in actual code for the hell of it.
Seems to generate the same kind of bytecode as the normal compiler.
2006-03-03 18:16:20 +00:00
Guido van Rossum
5bde08dba3
Fix failure of test_compiler.py when compiling test_contextlib.py.
...
The culprit was an expression-less yield -- the first apparently in
the standard library. I added a unit test for this.
Also removed the hack to force compilation of test_with.py.
2006-03-02 04:24:01 +00:00
Guido van Rossum
7ad94f011e
Update the compiler package to compile the with-statement.
...
Jeremy, please review!
2006-02-28 00:32:16 +00:00
Martin v. Löwis
59977a677c
Make or_test similar to test, not testlist.
2006-02-27 19:57:01 +00:00
Martin v. Löwis
16c7f71380
Handle testlist_safe and or_test like testlist.
2006-02-27 16:11:03 +00:00
Martin v. Löwis
49a1302952
Alias non-terminals introduced for backwards compatibility.
2006-02-27 16:03:39 +00:00
Neal Norwitz
212a575242
Remove unused _callers member. No need for types, use isinstance
2005-11-25 03:19:29 +00:00
Phillip J. Eby
0d6615fd29
PEP 342 implementation. Per Guido's comments, the generator throw()
...
method still needs to support string exceptions, and allow None for the
third argument. Documentation updates are needed, too.
2005-08-02 00:46:46 +00:00
Georg Brandl
f0af0e7a46
patch [ 1231538 ] Typo fix in compiler/transformer.py (WalkerEror)
2005-07-02 18:37:41 +00:00