Message410174
| Author | serhiy.storchaka |
|---|---|
| Recipients | barry, ben11kehoe, serhiy.storchaka |
| Date | 2022-01-09.22:39:56 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1641767996.68.0.462664535252.issue46307@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
The simplest way of collecting template names is to use a defaultdict:
>>> d = collections.defaultdict(str)
>>> string.Template('$a $b').substitute(d)
' '
>>> d.keys()
dict_keys(['a', 'b'])
You can use a custom mapping if you need special handling of absent keys. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-01-09 22:39:56 | serhiy.storchaka | set | recipients: + serhiy.storchaka, barry, ben11kehoe |
| 2022-01-09 22:39:56 | serhiy.storchaka | set | messageid: <1641767996.68.0.462664535252.issue46307@roundup.psfhosted.org> |
| 2022-01-09 22:39:56 | serhiy.storchaka | link | issue46307 messages |
| 2022-01-09 22:39:56 | serhiy.storchaka | create | |