On 01/13/2014 01:49 AM, Mark Shannon wrote:
'%s' can't work in 3.5, as we must differentiate between
strings which meed to be encoded and bytes which don't.
I don't understand this objection:
def __mod__(self, other):
if isinstance(other, bytes):
# no encoding necessary
elif isinstance(other, str):
# payback time!
other = ascii(other)
Where is the problem?
--
~Ethan~
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com