Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77664

Re: How to turn a string into a list of integers?

Subject Re: How to turn a string into a list of integers?
From Kurt Mueller <kurt.alfred.mueller@gmail.com>
Date 2014-09-06 21:28 +0200
References (4 earlier) <1k9odb-1qs.ln1@chris.zbmc.eu> <mailman.13801.1409939785.18130.python-list@python.org> <540aa002$0$29968$c3e8da3$5496439d@news.astraweb.com> <mailman.13833.1410005730.18130.python-list@python.org> <540b504a$0$29974$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.13842.1410031704.18130.python-list@python.org> (permalink)

Show all headers | View raw


Am 06.09.2014 um 20:19 schrieb Steven D'Aprano <steve+comp.lang.python@pearwood.info>:
> Kurt Mueller wrote:
> [...]
>> Now the part of the two Python builds is still somewhat unclear to me.
> [...]
>> In Python 2.7:
>> As I learned from the ord() manual:
>> If a unicode argument is given and Python was built with UCS2 Unicode,
> Where does the manual mention UCS-2? As far as I know, no version of Python
> uses that.

https://docs.python.org/2/library/functions.html?highlight=ord#ord


[snip] very detailed explanation of narrow/wide build, UCS-2/UCS-4, UTF-16/UTF-32



> Remember, though, these internal representations are (nearly) irrelevant to
> Python code. In Python code, you just consider that a Unicode string is an
> array of ordinal values from 0x0 to 0x10FFFF, each representing a single
> code point U+0000 to U+10FFFF. The only reason I say "nearly" is that
> narrow builds don't *quite* work right if the string contains surrogate
> pairs.

So I can interpret your last section:
Processing any Unicode string will work with small and wide
python 2.7 builds and also with python >3.3?
( parts of small build python will not work with values over 0xFFFF )
( strings with surrogate pairs will not work correctly on small build python )



Many thanks for your detailed answer!
-- 
Kurt Mueller, kurt.alfred.mueller@gmail.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to turn a string into a list of integers? cl@isbd.net - 2014-09-03 13:27 +0100
  Re: How to turn a string into a list of integers? Peter Otten <__peter__@web.de> - 2014-09-03 14:52 +0200
    Re: How to turn a string into a list of integers? cl@isbd.net - 2014-09-03 15:48 +0100
      Re: How to turn a string into a list of integers? Joshua Landau <joshua@landau.ws> - 2014-09-04 22:06 +0100
        Re: How to turn a string into a list of integers? cl@isbd.net - 2014-09-05 09:42 +0100
          Re: How to turn a string into a list of integers? Kurt Mueller <kurt.alfred.mueller@gmail.com> - 2014-09-05 19:56 +0200
            Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-06 15:47 +1000
              Re: How to turn a string into a list of integers? Peter Otten <__peter__@web.de> - 2014-09-06 10:22 +0200
                Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-06 21:17 +1000
              Re: How to turn a string into a list of integers? Kurt Mueller <kurt.alfred.mueller@gmail.com> - 2014-09-06 14:15 +0200
                Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-07 04:19 +1000
                Re: How to turn a string into a list of integers? Kurt Mueller <kurt.alfred.mueller@gmail.com> - 2014-09-06 21:28 +0200
                Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-07 11:47 +1000
                Re: How to turn a string into a list of integers? MRAB <python@mrabarnett.plus.com> - 2014-09-07 15:52 +0100
                Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-08 03:02 +1000
                Re: How to turn a string into a list of integers? Rustom Mody <rustompmody@gmail.com> - 2014-09-07 10:53 -0700
                Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-08 04:08 +1000
                Re: How to turn a string into a list of integers? Rustom Mody <rustompmody@gmail.com> - 2014-09-07 11:34 -0700
                Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-08 10:14 +1000
                Re: How to turn a string into a list of integers? Marko Rauhamaa <marko@pacujo.net> - 2014-09-08 08:44 +0300
                Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-08 15:53 +1000
                Re: How to turn a string into a list of integers? Terry Reedy <tjreedy@udel.edu> - 2014-09-08 03:41 -0400
                Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-08 01:04 +1000
                Re: How to turn a string into a list of integers? Roy Smith <roy@panix.com> - 2014-09-07 11:40 -0400
                Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-08 04:00 +1000
                Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-08 10:12 +1000
              Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-06 22:23 +1000
          Re: How to turn a string into a list of integers? Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-09-05 20:25 +0200
          Re: How to turn a string into a list of integers? Kurt Mueller <kurt.alfred.mueller@gmail.com> - 2014-09-05 21:16 +0200
          Re: How to turn a string into a list of integers? Kurt Mueller <kurt.alfred.mueller@gmail.com> - 2014-09-05 22:41 +0200
      Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-05 10:12 +1000
      Re: How to turn a string into a list of integers? Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-04 20:09 -0600
      Re: How to turn a string into a list of integers? Chris Angelico <rosuav@gmail.com> - 2014-09-05 12:15 +1000
        Re: How to turn a string into a list of integers? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-06 14:27 +1000
  Re: How to turn a string into a list of integers? obedrios@gmail.com - 2014-09-03 07:30 -0700

csiph-web