[Mumps2Py:] [69] fixed string quote handling.

[ Thread Index | Date Index | More lists.mumps2py.org/discuss Archives ]


Revision: 69
Author:   pgallot
Date:     2008-01-30 23:47:15 +0000 (Wed, 30 Jan 2008)

Log Message:
-----------
fixed string quote handling.

Modified Paths:
--------------
    trunk/mumps2py/tok2python.py


Modified: trunk/mumps2py/tok2python.py
===================================================================
--- trunk/mumps2py/tok2python.py	2008-01-30 23:45:40 UTC (rev 68)
+++ trunk/mumps2py/tok2python.py	2008-01-30 23:47:15 UTC (rev 69)
@@ -154,8 +154,8 @@
 
     def translate_str(translation, token):
         """ translates a Mumps string to Python """
-        new_str = re.sub(r'["]{2}', '\"', token.val[1:-1])
-        return '\"'+ new_str + '\"'
+        new_str = re.sub(r'["]{2}', r'\"', token.val[1:-1])
+        return r'"'+ new_str + r'"'
 
     def translate_fcc_newline(translation, token):
         """ translates a Mumps-style newline to Python"""


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/