Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'algorithm': 0.04; 'cpython': 0.05; 'say,': 0.05; 'encoded': 0.07; 'string': 0.09; 'pep': 0.09; 'subject:into': 0.09; 'subject:string': 0.09; 'subject:How': 0.10; 'api': 0.11; 'cc:addr:python-list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'elements': 0.16; 'language': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'memory': 0.22; 'cc:addr:python.org': 0.22; 'of.': 0.24; 'mon,': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'world,': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'expanding': 0.29; 'subject:list': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'sep': 0.31; 'says': 0.33; 'maybe': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'like,': 0.36; 'subject:?': 0.36; 'detail': 0.37; 'pm,': 0.38; 'how': 0.40; 'even': 0.60; 'skip:u 10': 0.60; 'making': 0.63; 'kind': 0.63; 'our': 0.64; 'face': 0.64; 'governs': 0.84; 'tricky': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=uRDecC5GzkQEFszFeT2bQ6DqLji7KmT+StSDgFS/OEE=; b=D3yQw2vjsxML9AeedzjHtk75Uy20B40JyJboKeghcKl4OG6XbbZCm1gaXP2i7edQct 3pa1cjX+ZurAgbzeRfihtCsGHf+aeqozk/hZQG4ZJZYIbGODF5Jc4fPN9OD3zN9+OMqw cg13FWYF84bniCxHQmN0zukX7Dn2lxZOpmZDoOey7ojdVXdFMmYNrqIU1MzA66Z4Q69R aaSq1CKN8Yyv6SAsDSdcyPQIyvek42XSS5tkC2PTArqTgCVGFOG2To8njA/1jZ0kA3RJ 14ADCToOOyhXHINRKX1/6yTZCtgArQ/ZDp9MxqeoRSrL9C7NG6ovxwfDb5KDsBL4iH0F 5boA== MIME-Version: 1.0 X-Received: by 10.42.114.130 with SMTP id g2mr29644756icq.46.1410155585871; Sun, 07 Sep 2014 22:53:05 -0700 (PDT) In-Reply-To: <8738c2ekex.fsf@elektro.pacujo.net> References: <1amjdb-p3n.ln1@chris.zbmc.eu> <1k9odb-1qs.ln1@chris.zbmc.eu> <540aa002$0$29968$c3e8da3$5496439d@news.astraweb.com> <540b504a$0$29974$c3e8da3$5496439d@news.astraweb.com> <540bb91c$0$29969$c3e8da3$5496439d@news.astraweb.com> <540c8fc4$0$29973$c3e8da3$5496439d@news.astraweb.com> <8b80fe39-4aea-4a17-a1a6-a44f0b42fb7b@googlegroups.com> <540c9f19$0$29999$c3e8da3$5496439d@news.astraweb.com> <8738c2ekex.fsf@elektro.pacujo.net> Date: Mon, 8 Sep 2014 15:53:05 +1000 Subject: Re: How to turn a string into a list of integers? From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1410155589 news.xs4all.nl 2957 [2001:888:2000:d::a6]:34529 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77694 On Mon, Sep 8, 2014 at 3:44 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> The original question was regarding storage - how PEP 393 says that >> strings will be encoded in memory in any of three ways (Latin-1, >> UCS-2/UTF-16, or UCS-4/UTF-32). But even in our world, that is not >> what a string *is*, but only what it is made of. > > I'm a bit surprised that kind of CPython implementation detail would go > into a PEP. I had thought PEPs codified Python independently of CPython. > > But maybe CPython is to Python what England is to the UK: even the > government is having a hard time making a distinction. It is a bit of a tricky one. The PEP governs things about the API that CPython offers to extensions, so it's part of the public face of the language - it's not "purely an implementation detail" like, say, the exact algorithm for expanding a list's capacity as elements get appended to it. ChrisA