No, I don't think it is. The purpose is to make it easier to work with bytes objects. There can be no python 2 compatibility when it comes to bytes/unicode conversion.
________________________________________ From: Python-Dev [[email protected]] on behalf of Serhiy Storchaka [[email protected]] Sent: Saturday, January 11, 2014 21:01 To: [email protected] Subject: Re: [Python-Dev] PEP 460: allowing %d and %f and mojibake 11.01.14 21:40, Kristján Valur Jónsson написав(ла): > How about a compromise? > Personally, I think adding the full complement of integer/float formatting to > bytes is a bit over the top. > How about just supporting two format specifiers? > %b : interpolate a bytes object. If it doesn't have the buffer interface, > error. > %s : interpolate a str object, encoded to ASCII using 'strict' conversion. %b is not supported in Python 2.7. And compatibility with Python 2.7 is only the purpose of this feature. _______________________________________________ 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
