[Numpy-discussion] String type again.

Chris Barker chris.barker at noaa.gov
Fri Jul 18 15:32:55 EDT 2014


On Fri, Jul 18, 2014 at 9:59 AM, Nathaniel Smith <njs at pobox.com> wrote:

> IMO the extra characters aren't the most compelling argument for
> latin1 over ascii. Latin1 gives the nice assurance that if some jerk
> *does* give me an "ascii" file that somewhere has some byte with the
> 8th bit set, then I can still load the data and fix things by hand.
>

On Fri, Jul 18, 2014 at 10:39 AM, Charles R Harris <
charlesr.harris at gmail.com> wrote:

> Just to throw in one more complication, there is no buffer protocol for a
> fixed encoding type. In Python 3 'c', 's', 'p' are all considered as bytes,
> in Python 2 as strings.


I suppose another option is to formally cal it what has been a defacto
non-standard for years:

ascii-with-who-knows-what-for-the-higher-codes.

i.e ASCII, but  not barf on decoding, (replace?).

but you can use latin-1 the same way, so why not?

-CHB

-- 

Christopher Barker, Ph.D.
Oceanographer

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/numpy-discussion/attachments/20140718/54f42e90/attachment.html>


More information about the NumPy-Discussion mailing list