[Python-Dev] PEP 460 reboot
Ethan Furman
ethan at stoneleaf.us
Mon Jan 13 16:33:56 CET 2014
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~
More information about the Python-Dev
mailing list