Issue 2826: safe_substitute() and substitute() - Python tracker

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.

classification
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: chester, georg.brandl
Priority: normal Keywords:

Created on 2008-05-11 21:34 by chester, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg66675 - (view) Author: Chester (chester) Date: 2008-05-11 21:34
Please consider of removing safe_substitute() method and make the
current substitute() method act like safe_substitute() method but being
named substitute().
msg66677 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-05-11 21:48
First of all, you don't say which type these methods belong to. I assume
you mean string.Template.

What good would that be? Those extra 5 characters to type shouldn't be
the problem.

Many template strings have only defined keys, and it is a programming
error if a key is not given or misspelled in the template. In this case,
substitute() is the right function.

Rejecting this RFE.