This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author py.user
Recipients py.user
Date 2011-07-08.00:36:48
SpamBayes Score 0.00048329867
Marked as misclassified No
Message-id <1310085409.68.0.478281072881.issue12518@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import string
>>> class MyTemplate(string.Template):
...   delimiter = '.'
... 
>>> MyTemplate.delimiter = 'x'
>>> mt = MyTemplate('.field xfield')
>>> mt.substitute(field=None)
'None xfield'
>>> mt.delimiter
'x'
>>>


If I want to change the pattern string by any delimiter, I should create a new class for every delimiter

I would change the delimiter either in the object or in the class at any time
History
Date User Action Args
2011-07-08 00:36:49py.usersetrecipients: + py.user
2011-07-08 00:36:49py.usersetmessageid: <1310085409.68.0.478281072881.issue12518@psf.upfronthosting.co.za>
2011-07-08 00:36:49py.userlinkissue12518 messages
2011-07-08 00:36:48py.usercreate