Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'anyway.': 0.05; 'encoding': 0.05; 'binary': 0.07; 'string': 0.09; 'ascii': 0.09; 'bytes.': 0.09; 'subject:design': 0.09; 'suggest': 0.14; '16-bit': 0.16; '8-bit': 0.16; 'finney': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'intervening': 0.16; 'janssen': 0.16; 'subject:Language': 0.16; 'wrote:': 0.18; 'normally': 0.19; 'thu,': 0.19; '>>>': 0.22; 'bytes': 0.24; 'replace': 0.24; 'unicode': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'argue': 0.31; 'sep': 0.31; 'text': 0.33; "i'd": 0.34; 'common': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'data,': 0.36; 'sequence': 0.36; 'similar': 0.36; 'should': 0.36; 'turn': 0.37; 'list': 0.37; 'area': 0.37; 'ben': 0.38; 'to:addr:python-list': 0.38; 'little': 0.38; '12,': 0.39; 'to:addr:python.org': 0.39; 'most': 0.60; "you're": 0.61; 'more': 0.64; 'charset:windows-1252': 0.65; 'series': 0.66; '2013,': 0.91; '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:content-transfer-encoding; bh=QgserrW7AjmuVCL8Ae/aaWr5uiYvf9sIBMMNCaipTq4=; b=fSDXZvnsUtRrV31nTdVaR+sFgXPIQGewskO5AYwv4wxzAi+NS9kVMz7cGQ423Ncfpf SA0ALZiVEtDC10rC8sN3fk9SSVyjsb2nwCQ3RTEoHP38JEn9I1yR2HD+5wCQ9DpSK7LR EuSsT7C+fZW9W696JROdDnJWgDaNDRopdI8nlFpGDdp11ynMWI0QNOfOgEkGwqe2c/kP AZi1kCf3XnEUHjOAVUsyRbHsqdE6nnnrhxfT08Y1gwu3jiqCthDcy5vqPP4CDHiU9vJ3 fALeaVEeTiHHflRUCCRLA0fsY8zGFF/Au7nUz0KbJ5fwmxYDDoehfvzgmgpGJmSiFhym JP3g== MIME-Version: 1.0 X-Received: by 10.58.137.167 with SMTP id qj7mr3824330veb.1.1378945886688; Wed, 11 Sep 2013 17:31:26 -0700 (PDT) In-Reply-To: References: <522eb795$0$29999$c3e8da3$5496439d@news.astraweb.com> <7wbo412m02.fsf@benfinney.id.au> <7w38pb2ble.fsf@benfinney.id.au> Date: Thu, 12 Sep 2013 10:31:26 +1000 Subject: Re: Language design From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378945896 news.xs4all.nl 15899 [2001:888:2000:d::a6]:41796 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54015 On Thu, Sep 12, 2013 at 10:25 AM, Mark Janssen wrote: >>> On Tue, 10 Sep 2013, Ben Finney wrote: >>> > The sooner we replace the erroneous >>> > =93text is ASCII=94 in the common wisdom with =93text is Unicode=94,= the >>> > better. >>> >>> I'd actually argue that it's better to replace the common wisdom with >>> "text is binary data, and we should normally look at that text through >>> Unicode eyes". A little less catchy, but more accurate ;) >> >> No, that's inaccurate. A sequence of bytes is binary data. Unicode is >> not binary data. > > Well now, this is an area that is not actually well-defined. I would > say 16-bit Unicode is binary data if you're encoding in base 65,536, > just as 8-bit ascii is binary data if you're encoding in base-256. > Which is to say: there is no intervening data to suggest a TYPE. Unicode is not 16-bit any more than ASCII is 8-bit. And you used the word "encod[e]", which is the standard way to turn Unicode into bytes anyway. No, a Unicode string is a series of codepoints - it's most similar to a list of ints than to a stream of bytes. ChrisA