185 Commits

Author SHA1 Message Date
Martin Panter
b1d867f149 Issue #27076: Doc, comment and test function name spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:28:50 +00:00
Serhiy Storchaka
e06224340d Backed out changeset 7d2018774925 2015-02-16 01:49:22 +02:00
Serhiy Storchaka
eab2fd10cf Use os.devnull instead of hardcoded '/dev/null'. 2015-02-15 13:57:49 +02:00
Antoine Pitrou
b9d4963a98 Issue #7092: Fix the DeprecationWarnings emitted by the standard library
when using the -3 flag.  Patch by Florent Xicluna.
2010-01-04 23:22:44 +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
Tim Peters
ca4d08b6d3 NodeInfo.__gen_init(): Fiddle so that reindent.py is
happy with the output as-is.  This incidentally also
gets rid of "an extra" blank line at the end of the output
block that probably wasn't intended (although it doesn't
matter one way or the other).
2006-03-09 22:31:45 +00:00
Thomas Wouters
7e2ac2533e Update for absolute/relative imports and ifelse-expressions. 2006-03-03 18:11:37 +00:00
Guido van Rossum
c2e20744b2 PEP 343 -- the with-statement.
This was started by Mike Bland and completed by Guido
(with help from Neal).

This still needs a __future__ statement added;
Thomas is working on Michael's patch for that aspect.

There's a small amount of code cleanup and refactoring
in ast.c, compile.c and ceval.c (I fixed the lltrace
behavior when EXT_POP is used -- however I had to make
lltrace a static global).
2006-02-27 22:32:47 +00:00
Tim Peters
536cf99536 Whitespace normalization. 2005-12-25 23:18:31 +00:00
Andrew M. Kuchling
a6d4b68254 Add comment about updating docs 2005-11-22 15:01:13 +00:00
Jeremy Hylton
3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Neil Schemenauer
f36947032f Fix compiler.ast.flatten function so that it works on lists. 2005-06-02 05:55:20 +00:00
Tim Peters
0e9980f75a Whitespace normalization. 2004-09-12 03:49:31 +00:00
Jeremy Hylton
566d934745 compiler.transformer: correct lineno attribute when possible
SF patch #1015989

The basic idea of this patch is to compute lineno attributes for all AST nodes.  The actual
implementation lead to a lot of restructing and code cleanup.

The generated AST nodes now have an optional lineno argument to constructor.  Remove the
top-level asList(), since it didn't seem to serve any purpose.  Add an __iter__ to ast nodes.
Use isinstance() instead of explicit type tests.

Change transformer to use the new lineno attribute, which replaces three lines of code with one.
Use universal newlines so that we can get rid of special-case code for line endings.  Use
lookup_node() in a few more frequently called, but simple com_xxx methods().  Change string
exception to class exception.
2004-09-07 15:28:01 +00:00
Anthony Baxter
c2a5a63654 PEP-0318, @decorator-style. In Guido's words:
"@ seems the syntax that everybody can hate equally"
Implementation by Mark Russell, from SF #979728.
2004-08-02 06:10:11 +00:00
Tim Peters
182b5aca27 Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
Raymond Hettinger
354433a59d SF patch #872326: Generator expression implementation
(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.
2004-05-19 08:20:33 +00:00
Walter Dörwald
70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Guido van Rossum
3b0a3293c3 Massive changes from SF 589982 (tempfile.py rewrite, by Zack
Weinberg).  This changes all uses of deprecated tempfile functions to
the recommended ones.
2002-08-09 16:38:32 +00:00
Jeremy Hylton
b8903fbf9b Test utility to look for bad stacksize calculations. 2001-10-17 13:39:06 +00:00
Fred Drake
19405a4a2a Removed files no longer needed. 2001-09-28 17:22:35 +00:00
Jeremy Hylton
5953b40442 Remove setup.py, unnecessary since compiler package is the std
library.

Update README.
2001-09-20 15:02:27 +00:00
Jeremy Hylton
e54b5b4f81 Moved to Tools/compiler along with astgen.py 2001-09-20 14:59:00 +00:00
Jeremy Hylton
b3c569ce82 The compiler package is now part of the standard library.
Remove all these files.  All except astgen.py are moved to Lib/compiler.
2001-09-20 01:27:40 +00:00