On 03/27/2014 11:53 AM, Guido van Rossum wrote:

So what's the use case for Python 2/3 compatible code? IMO the main use case 
for the PEP is simply to be able to
construct bytes from a combination of a template and some input that may 
include further bytes and numbers. E.g. in
asyncio when you write an HTTP client or server you have to construct bytes to 
write to the socket, and I'd be happy if
I could write b'HTTP/1.0 %d %b\r\n' % (status, message) rather than having to 
use str(status).encode('ascii') and
concatenation or join().

My own dbf module [1] would make use of this feature, and I'm sure some of the pdf modules would as well (I recall somebody chiming in about their own pdf module).

--
~Ethan~

[1] https://pypi.python.org/pypi/dbf
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to