[Python-Dev] Extracting variables from string.Template objects (original) (raw)
Isaac Morland ijmorlan at cs.uwaterloo.ca
Sat Jan 5 00:07:00 CET 2008
- Previous message: [Python-Dev] Extracting variables from string.Template objects
- Next message: [Python-Dev] Extracting variables from string.Template objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 4 Jan 2008, Aahz wrote:
Also, on a related issue, does it make sense to scan the template string for invalid escape sequences in Template.init? For the applications I can imagine of string.Template, I would prefer to get an error upon creating the Template object rather than arbitrarily later when I try to .substitute with it. No, create an isvalid() method at best.
I'm curious as to why. Is it to avoid changing the behaviour of existing code (i.e., backwards compatibility), or do you see a design problem with having the Template constructor reject invalid template strings?
Isaac Morland CSCF Web Guru DC 2554C, x36650 WWW Software Specialist
- Previous message: [Python-Dev] Extracting variables from string.Template objects
- Next message: [Python-Dev] Extracting variables from string.Template objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]