string.Template issue

Aahz aahz at
Sun Aug 2 01:36:58 CEST 2009

In article <mailman.3938.1248942327.8015.python-list at>,
Javier Collado  <javier.collado at> wrote:
>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)

Good point!  I don't have an answer for you, but please file a report at to make sure it doesn't get lost.
Aahz (aahz at           <*>

"Many customs in this life persist because they ease friction and promote
productivity as a result of universal agreement, and whether they are
precisely the optimal choices is much less important." --Henry Spencer

More information about the Python-list mailing list