"convert" string to bytes without changing data (encoding)
Ross Ridge
rridge at csclub.uwaterloo.ca
Wed Mar 28 14:05:11 EDT 2012
Ross Ridge <rridge at csclub.uwaterloo.ca> wr=
> Of course it is. =A0Conceptually you're not supposed to think of it that
> way, but a string is stored in memory as a series of bytes.
Chris Angelico <rosuav at gmail.com> wrote:
>Note that distinction. I said that a string "is not" a series of
>bytes; you say that it "is stored" as bytes.
The distinction is meaningless. I'm not going argue with you about what
you or I ment by the word "is".
>But a Python Unicode string might be stored in several
>ways; for all you know, it might actually be stored as a sequence of
>apples in a refrigerator, just as long as they can be referenced
>correctly.
But it is in fact only stored in one particular way, as a series of bytes.
>There's no logical Python way to turn that into a series of bytes.
Nonsense. Play all the semantic games you want, it already is a series
of bytes.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rridge at csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
More information about the Python-list
mailing list