Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'encoding': 0.05; 'indexing': 0.07; 'string': 0.09; '32-bit': 0.09; 'character,': 0.09; 'counting': 0.09; 'subject:language': 0.09; 'supported,': 0.09; 'character.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterable,': 0.16; 'surrogate': 0.16; 'wrote:': 0.18; 'trying': 0.19; "hasn't": 0.19; 'unicode': 0.24; 'mon,': 0.24; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'this.': 0.32; 'figure': 0.32; 'beginning': 0.33; 'subject: (': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'nov': 0.38; 'to:addr :python-list': 0.38; 'list,': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'satisfied': 0.81; 'characters,': 0.84; '2013': 0.98 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:to :content-type; bh=o1qpX1fr0Meee84LOS+wQpDaDLFMBBN5R1lLMBKIvCs=; b=pi8z1xJVVz4kPI2X89Tc2NpNF5boxC5co5PWafaTBkpNNsGNVsb/jqSKp7QqMwugrG Qr8Zdt2UciuCXAXQKPgZ1zllg7/4T0lEeyT9Sr09046fLWRC66jwTtkvG2Yov3vpG5uG tYcPb8AewRdrqbstZLGFjvywD5YBJ5K71TiCzTg7+BkVX/fHqpAbvQKzqnKP7hkLarKq 4c2u6vNnMSytcYTx1oQvbJWkLWXQ8QyiKI7IASfaHE5plaI1XeEnSkOsJPGcA6nB4vKE mAMprrai1uTSz7n8EOiavPMGVmmLvU1sK17xWoxeHaX6kk94WSfogXmkS2xXi0TGkMTT SCJw== MIME-Version: 1.0 X-Received: by 10.66.136.176 with SMTP id qb16mr2059375pab.131.1384769081210; Mon, 18 Nov 2013 02:04:41 -0800 (PST) In-Reply-To: <41f332dd-1c31-4699-9176-7e8589f9c8ae@googlegroups.com> References: <1f0ffad0-f9b1-4154-b048-510d8e38846e@googlegroups.com> <41f332dd-1c31-4699-9176-7e8589f9c8ae@googlegroups.com> Date: Mon, 18 Nov 2013 21:04:41 +1100 Subject: Re: Oh look, another language (ceylon) From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1384769090 news.xs4all.nl 15893 [2001:888:2000:d::a6]:35190 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:59847 On Mon, Nov 18, 2013 at 8:44 PM, wrote: > string > Satisfied Interfaces: Category, Cloneable>, Collection, > Comparable, Correspondence, Iterable, > List, Ranged, Summable > A string of characters. Each character in the string is a 32-bit Unicode > character. The internal UTF-16 encoding is hidden from clients. > A string is a Category of its Characters, and of its substrings: I'm trying to figure this out. Reading the docs hasn't answered this. If each character in a string is a 32-bit Unicode character, and (as can be seen in the examples) string indexing and slicing are supported, then does string indexing mean counting from the beginning to see if there were any surrogate pairs? ChrisA