[Python-checkins] python/dist/src/Modules _csv.c,1.18,1.19

andrewmcnamara at users.sourceforge.net andrewmcnamara at users.sourceforge.net
Mon Jan 10 02:04:43 CET 2005


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

Modified Files:
	_csv.c 
Log Message:
Fix parsing of csv files with escapes (escape character previously would be
left in stream).


Index: _csv.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_csv.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- _csv.c	7 Jan 2005 06:46:50 -0000	1.18
+++ _csv.c	10 Jan 2005 01:04:40 -0000	1.19
@@ -584,10 +584,6 @@
 		break;
 
 	case ESCAPED_CHAR:
-		if (c != dialect->escapechar && 
-                    c != dialect->delimiter &&
-		    c != dialect->quotechar)
-			parse_add_char(self, dialect->escapechar);
 		parse_add_char(self, c);
 		self->state = IN_FIELD;
 		break;
@@ -642,10 +638,6 @@
 		break;
 
 	case ESCAPE_IN_QUOTED_FIELD:
-		if (c != dialect->escapechar && 
-                    c != dialect->delimiter &&
-		    c != dialect->quotechar)
-			parse_add_char(self, dialect->escapechar);
 		parse_add_char(self, c);
 		self->state = IN_QUOTED_FIELD;
 		break;



More information about the Python-checkins mailing list