On 23Feb2014 22:56, Victor Stinner <victor.stinner at gmail.com> wrote: > > An aid to debugging -- need to see what's what at that moment? Toss it > > into %a. It is not intended for production code, but is included to > > hopefully circumvent the inappropriate use of __bytes__ methods on classes. > > How do you plan to use this output? Write it into a socket or a file? > When I debug, I use print & logging which both expect text string. So I > think that b'%a' is useless. The case from the email thread, which I support at +0.5 or maybe only +0.1, is printing to a binary log. The classic example that comes to mind is syslog packets. I agree %a invites data mangling. One would hope it doesn't see use in wire protocols, only in debugging scenarios. Regrettably, syslog is such a binary logging protocol, purportedly for "text". Cheers, -- Cameron Simpson <cs at zip.com.au> We had the experience, but missed the meaning. - T.S. Eliot
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4