[Python-ideas] a new bytestring type?

Mark Janssen dreamingforward at gmail.com
Mon Jan 6 03:00:27 CET 2014


>> "arrays of integers"?  You mean, unsigned short ints?  There's an
>> important difference.  One references an abstraction, and one
>> references a concrete machine type.
>>
>> The other consideration is knowing what you mean by "string", if you
>> mean something to be interpreted textually, then the convention is to
>> use unsigned chars to document your intentions, which "technically" is
>> the same (as far as memory layout is concerned).  (I say "technically"
>> because there is some space reserved for endian-ness which can change
>> the bit ordering.)
>
> One mistake I already wish to correct ...
> Trying to be complete...

Come to think of it, this issue (the relationship between bytes, text,
and char/ints) may be the entire reason Python3 "uptake" hasn't
happened.  It gets back to the same old argument I've been trying to
make about "models of computation".  Python3 apparently did not
respect the machine and went the way of the "dark side", hence
scientific computing hasn't been as quick to convert to Python 3.

Specifically, the final issue with regard to bytes (and it's
consequent model of computation) is thus:   1) how they maintain
representation on the file system (the "disk") vs. 2) how they are
represented and managed in memory.  This is the primary articulation
point regarding how the *abstraction of computing* relates to its
*implementation*.  This also relates to the Turing Machine and it's
articulation with the underlying VonNeumann architecture
(implementation).

Ned, I hope you're finally understanding this.

MarkJ


More information about the Python-ideas mailing list