Serhiy Storchaka added the comment: 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' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25652> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com