Message261273
What about such example?
>>> class F:
... def __init__(self, value):
... self.value = value
... def __mod__(self, other):
... if isinstance(other, str):
... return self.value % other
... return NotImplemented
...
>>> from collections import UserString
>>> F('say %s') % UserString('hello')
'say hello' |
|
Date |
User |
Action |
Args |
2016-03-06 20:48:11 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, pitrou, xiang.zhang, jcgoble3 |
2016-03-06 20:48:11 | serhiy.storchaka | set | messageid: <1457297291.67.0.506243807567.issue25652@psf.upfronthosting.co.za> |
2016-03-06 20:48:11 | serhiy.storchaka | link | issue25652 messages |
2016-03-06 20:48:11 | serhiy.storchaka | create | |
|