Re: [Python-Dev] byteformat() proposal: please critique

2014-01-11 Thread Nick Coghlan
On 12 January 2014 12:13, Brett Cannon wrote: > With that flexibility this matches what I have been mulling in the back of > my head all day. Basically everything that goes in is assumed to be bytes > unless {:s} says to expect something which can be passed to str() and then > use some specified e

Re: [Python-Dev] byteformat() proposal: please critique

2014-01-11 Thread Ethan Furman
On 01/11/2014 05:20 PM, Terry Reedy wrote: The following function . . . Thanks, Terry, for doing that. -- ~Ethan~ ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.

Re: [Python-Dev] byteformat() proposal: please critique

2014-01-11 Thread Brett Cannon
On Sat, Jan 11, 2014 at 8:20 PM, Terry Reedy wrote: > The following function interpolates bytes, bytearrays, and formatted > strings, the latter two auto-converted to bytes, into a bytes (or > auto-converted bytearray) format. This function automates much of what some > people have recommended fo

[Python-Dev] byteformat() proposal: please critique

2014-01-11 Thread Terry Reedy
The following function interpolates bytes, bytearrays, and formatted strings, the latter two auto-converted to bytes, into a bytes (or auto-converted bytearray) format. This function automates much of what some people have recommended for combining ascii text and binary blogs. The test passes o