[Python-Dev] Python3 "complexity"

Chris Barker chris.barker at noaa.gov
Sat Jan 11 00:58:07 CET 2014

On Fri, Jan 10, 2014 at 3:22 PM, Mark Lawrence <breamoreboy at yahoo.co.uk>wrote:

> The correct way is to read the interface specification which tells you
> what should be in the data.  Or do people not use interface specifications
> these days, preferring to guess what they've got instead?

No one is suggesting guessing (OK, sometimes for what encoding text is in
-- but that's when you already know it's text). But while some specs for
mixed ascii and binary may specify which bytes are which, not all do --
there may be a read the file 'till you find this text, then the next n
bytes are binary, or maybe the next bytes are binary until you get to this
ascii text, etc...

This is not guessing, but it does require working with an object which has
both ascii text and binary in it -- and why shouldn't Python provide a
reasonable way to work with that?



Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140110/23777b58/attachment.html>

More information about the Python-Dev mailing list