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 ben11kehoe
Recipients barry, ben11kehoe, serhiy.storchaka
Date 2022-01-09.22:20:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CADnHiRtwXs6_Ewq3u-sVkjdLJKUPRaYpAXGSnPOwSUK48D+cpw@mail.gmail.com>
In-reply-to <1641736429.21.0.633548021827.issue46307@roundup.psfhosted.org>
Content
The point is to be able to programmatically determine what is needed for a
successful substitute() call. A basic use case for this is better error
messages; calling substitute() with an incomplete mapping will tell you
only the first missing identifier it encounters; if you know all the
identifiers you can raise an error about all the missing identifiers.
Another error handling use case is checking whether the template is valid,
without needing to provide a complete mapping. A use case unrelated to
error handling that I’ve encountered a few times is interactive prompting
for template values, which you can only do if you can get a list of the
identifiers in the template.
History
Date User Action Args
2022-01-09 22:20:41ben11kehoesetrecipients: + ben11kehoe, barry, serhiy.storchaka
2022-01-09 22:20:41ben11kehoelinkissue46307 messages
2022-01-09 22:20:41ben11kehoecreate