PEP 263 comments

Stephen J. Turnbull stephen at xemacs.org
Mon Mar 4 11:36:29 EST 2002


>>>>> "Huaiyu" == Huaiyu Zhu <huaiyu at gauss.almadan.ibm.com> writes:

    >> [1] Ie, Python language or character text.  It might be
    >> convenient to have an octet-string primitive data type, in
    >> which you could put EUC-encoded Japanese or Java byte codes.

    Huaiyu> What's the difference between this and a raw string (a
    Huaiyu> byte sequence) that you can translate into any other
    Huaiyu> encoding?

None, in representation.[1]  However, it would not be a string in
the sense you know it in Python: you can't concatenate it, you can't
iterate over it, all you can do is read it, write it, access octets
(which are not characters), or turn it into something else that you
can do something with.  Consider: does it make sense to concatenate a
string of Java byte codes with a string of English text?


Footnotes: 
[1]  It might make sense to have a special representation for it in
source as a subset of the Unicode "private space".  But that's going
way afield.

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
              Don't ask how you can "do" free software business;
              ask what your business can "do for" free software.



More information about the Python-list mailing list