[Python-checkins] python/dist/src/Misc ACKS,1.280,1.281

jhylton at users.sourceforge.net jhylton at users.sourceforge.net
Tue Sep 7 17:28:03 CEST 2004


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16529/dist/src/Misc

Modified Files:
	ACKS 
Log Message:
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.

Index: ACKS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v
retrieving revision 1.280
retrieving revision 1.281
diff -u -d -r1.280 -r1.281
--- ACKS	29 Aug 2004 22:16:49 -0000	1.280
+++ ACKS	7 Sep 2004 15:28:01 -0000	1.281
@@ -563,6 +563,7 @@
 Ken Stox
 Daniel Stutzbach
 Paul Swartz
+Thenault Sylvain
 Geoff Talvola
 William Tanksley
 Christian Tanzer



More information about the Python-checkins mailing list