Message238132
string.Template doesn't allow to specify the self substitute parameter as keyword argument.
>>> import string
>>> string.Template('the self is $self').substitute(self='bozo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: substitute() got multiple values for argument 'self'
>>> string.Template('the self is $self').safe_substitute(self='bozo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: safe_substitute() got multiple values for argument 'self'
The same issue is with string.Formatter.format:
>>> string.Formatter().format('the self is {self}', self='bozo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: format() got multiple values for argument 'self'
Proposed patch fixes these issues. |
|
Date |
User |
Action |
Args |
2015-03-15 08:21:34 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, georg.brandl |
2015-03-15 08:21:34 | serhiy.storchaka | set | messageid: <1426407694.34.0.298286807857.issue23671@psf.upfronthosting.co.za> |
2015-03-15 08:21:34 | serhiy.storchaka | link | issue23671 messages |
2015-03-15 08:21:34 | serhiy.storchaka | create | |
|