On 23Feb2014 22:56, Victor Stinner <victor.stin...@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 <c...@zip.com.au>

We had the experience, but missed the meaning.  - T.S. Eliot
_______________________________________________
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