Author jcollado
Recipients jcollado
Date 2009-08-03.06:47:39
SpamBayes Score 1.24743e-08
Marked as misclassified No
Message-id <>
In the string.Template documentation
( it's explained that if a
custom regular expression for pattern substitution is needed, it's
possible to override idpattern class attribute (whose default value is

However, if the custom pattern that is needed is just uppercase
letters, something like [A-Z]+ won't work because of the following line
in the _TemplateMetaclass class __init__ method:
cls.pattern = _re.compile(pattern, _re.IGNORECASE | _re.VERBOSE)

I would say that this is an error (IGNORECASE just shouldn't be there)
and that the line above should be:
cls.pattern = _re.compile(pattern, _re.VERBOSE)
and the default value for idpattern:

Do you agree on this? Is there any reason for the IGNORECASE option to
be passed to re.compile?
Date User Action Args
2009-08-03 06:47:41jcolladosetrecipients: + jcollado
2009-08-03 06:47:41jcolladosetmessageid: <>
2009-08-03 06:47:40jcolladolinkissue6630 messages
2009-08-03 06:47:39jcolladocreate