[Mumps2Py:] [40] fixed a %-replacement bug.

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


Revision: 40
Author:   pgallot
Date:     2008-01-21 20:28:47 +0000 (Mon, 21 Jan 2008)

Log Message:
-----------
fixed a %-replacement bug.

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


Modified: trunk/mumps2py/tokprepass.py
===================================================================
--- trunk/mumps2py/tokprepass.py	2008-01-21 19:54:17 UTC (rev 39)
+++ trunk/mumps2py/tokprepass.py	2008-01-21 20:28:47 UTC (rev 40)
@@ -78,8 +78,7 @@
             if len(var) == 1:
                 new_varname = "var"
             else:
-                new_varname = var[:]
-                re.sub(r'[%]', '_', new_varname)
+                new_varname = re.sub(r'[%]', '_', var)
                 if new_varname[0] == '_':
                     new_varname = 'var' + new_varname
             for token in vars_dict[var]:


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