Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed2.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.021 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'compiler': 0.07; 'utf-8': 0.07; 'encode': 0.09; 'subject: [': 0.09; 'python': 0.11; "(i'm": 0.16; '(say': 0.16; 'bytes)': 0.16; 'encodes': 0.16; 'long)': 0.16; 'subject:versus': 0.16; 'surrogate': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'unicode': 0.24; 'mon,': 0.24; 'equivalent': 0.26; 'header:In- Reply-To:1': 0.27; 'character': 0.29; "doesn't": 0.30; 'characters': 0.30; '3.2': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'except': 0.35; 'really': 0.36; 'sequence': 0.36; 'bringing': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'itself': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'dave': 0.60; "you've": 0.63; 'received:74.208': 0.68; 'therefore': 0.72; 'received:74.208.4.194': 0.84; 'subject:gets': 0.84; 'angel': 0.91; '2013': 0.98 Date: Tue, 18 Jun 2013 00:12:34 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Variables versus name bindings [Re: A certainl part of an if() structure never gets executed.] References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> <51bb454c$0$29997$c3e8da3$5496439d@news.astraweb.com> <51beb20c$0$29872$c3e8da3$5496439d@news.astraweb.com> <51bf9714$0$29872$c3e8da3$5496439d@news.astraweb.com> <51bfacd0$0$29872$c3e8da3$5496439d@news.astraweb.com> <51bfc931$0$29872$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <51bfc931$0$29872$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:EkqRM8Jb2fecosPMoLKCfNq5lZFW8bufSyuvaqIjpZ9 hIW/qp/YkiklAP9scbGciKU7E0fG1Z+XJ+z6RDoGfr8HfKT+wl JpwLnxwvAcketpHOsqE+VZ/QOY32hu/ooeHqa7d95Ekh4cPCwM z2hJ6DaGWiDC/drvDym8XPe+tIb95F0nvRf/CdU7Kb4Q5QqY/T LEt5Zcu/07exZL1J3sIDQYljwjCE9J1MejccVPjz+heIjcC6lX 9zymlgGIHZ51DgJgo526y5LL0gWjpt2bulL9aJqKaYLFoeDAFW ZnwygoqGKijvFI90GS0iYSLyRRu0wWIzjqeeYTjl99WqTrfzOT hF6UAGElMCCcwmPqZwZg= 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371528775 news.xs4all.nl 15909 [2001:888:2000:d::a6]:60335 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48593 On 06/17/2013 10:42 PM, Steven D'Aprano wrote: > On Mon, 17 Jun 2013 21:06:57 -0400, Dave Angel wrote: > >> On 06/17/2013 08:41 PM, Steven D'Aprano wrote: >>> >>> >>> >>> In Python 3.2 and older, the data will be either UTF-4 or UTF-8, >>> selected when the Python compiler itself is compiled. >> >> I think that was a typo. Do you perhaps UCS-2 or UCS-4 > > Yes, that would be better. > > UCS-2 is identical to UTF-16, except it doesn't support non-BMP > characters and therefore doesn't have surrogate pairs. > > UCS-4 is functionally equivalent to UTF-16, Perhaps you mean UTF-32 ? as far as I can tell. (I'm > not really sure what the difference is.) > Now you've got me curious, by bringing up surrogate pairs. Do you know whether a narrow build (say 3.2) really works as UTF16, so when you encode a surrogate pair (4 bytes) to UTF-8, it encodes a single Unicode character into a single UTF-8 sequence (prob. 4 bytes long) ? -- DaveA