[Patches] [ python-Patches-1720390 ] Remove backslash escapes from tokanize.c.

SourceForge.net noreply at sourceforge.net
Sun May 20 04:14:30 CEST 2007


Patches item #1720390, was opened at 2007-05-16 17:23
Message generated for change (Comment added) made by ron_adam
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1720390&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 3000
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ron Adam (ron_adam)
Assigned to: Nobody/Anonymous (nobody)
Summary: Remove backslash escapes from tokanize.c.

Initial Comment:

This patch modifies tokanizer.c so that it does not skip the character after a backslash in determining the end of a string in raw strings only.

A few strings needed changes in order to compile.  Two in textwrap.py, and one in distutils/util.py.

This does not include changes needed for tests to pass.  I'll include those in a separate patch.


----------------------------------------------------------------------

>Comment By: Ron Adam (ron_adam)
Date: 2007-05-19 21:14

Message:
Logged In: YES 
user_id=1687923
Originator: YES

Here's a more complete patch which modifies the following files... (in
py3k_struni branch)

M      Python/ast.c
M      Parser/tokenizer.c
M      Lib/test/tokenize_tests.txt
M      Lib/tokenize.py

The test still dosen't pass, but it fails in the same way as it did before
these changes were made.  I'll continue to look into this.  I think it's
more of a problem with the test it self and not a problem with the modules.
 Or it may be a bug in the struni branch that is yet to be fixed.

The following alter one or two raw strings each replacing the outer most
quotes with triple quotes in most cases.

M      Lib/sgmllib.py
M      Lib/markupbase.py
M      Lib/textwrap.py
M      Lib/distutils/util.py
M      Lib/cookielib.py
M      Lib/pydoc.py
M      Lib/doctest.py
M      Lib/xml/etree/ElementTree.py
M      Lib/HTMLParser.py


----------------------------------------------------------------------

Comment By: Ron Adam (ron_adam)
Date: 2007-05-16 17:31

Message:
Logged In: YES 
user_id=1687923
Originator: YES

Forgot to specify...

This is against the py3k-struni branch, revision 55388.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1720390&group_id=5470


More information about the Patches mailing list