Fix a regular expression problem when recognizing labels for string substitution.

--HG--
extra : convert_revision : ba398e1b434efda28882f159d5a4419302276371
This commit is contained in:
Gabe Black 2007-04-04 23:19:32 +00:00
parent 4285990a96
commit ab2bed349b

View file

@ -1032,7 +1032,7 @@ def substBitOps(code):
# Template objects are format strings that allow substitution from
# the attribute spaces of other objects (e.g. InstObjParams instances).
labelRE = re.compile(r'[^%]%\(([^\)]+)\)[sd]')
labelRE = re.compile(r'(?<!%)%\(([^\)]+)\)[sd]')
class Template:
def __init__(self, t):