Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'string.': 0.05; 'differently': 0.07; 'utf-8': 0.07; 'ascii': 0.09; 'bytes.': 0.09; 'indexes': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'storage,': 0.09; 'used.': 0.09; 'useless': 0.09; 'python': 0.11; 'jan': 0.12; 'systems.': 0.12; '*never*': 0.16; 'buggy': 0.16; 'feasible': 0.16; 'internally': 0.16; 'itself,': 0.16; 'rationale': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'supported.': 0.16; 'url:peps': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'users.': 0.18; 'properly': 0.19; 'examples': 0.20; 'memory': 0.22; 'coding': 0.22; 'proposed': 0.22; 'header:User-Agent:1': 0.23; 'byte': 0.24; 'bytes': 0.24; 'stick': 0.24; 'unicode': 0.24; 'url:dev': 0.24; 'switch': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'fixed': 0.29; 'am,': 0.29; 'array': 0.29; 'characters': 0.30; 'compared': 0.30; 'waste': 0.30; 'especially': 0.30; 'code': 0.31; 'informative': 0.31; 'text': 0.33; 'worked': 0.33; 'url:python': 0.33; 'becomes': 0.33; 'beginning': 0.33; 'could': 0.34; 'agree': 0.35; 'classes': 0.35; 'common': 0.35; 'done.': 0.35; 'but': 0.35; 'there': 0.35; 'url:org': 0.36; 'wrong': 0.37; 'too': 0.37; 'two': 0.37; 'sometimes': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; '(from': 0.39; 'bad': 0.39; 'moving': 0.39; 'supporting': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'system.': 0.39; 'received:org': 0.40; 'users': 0.40; 'read': 0.60; '2nd': 0.60; 'improved': 0.60; 'is.': 0.60; 'removing': 0.60; 'subject:"': 0.60; 'hope': 0.61; 'break': 0.61; 'received:173': 0.61; 'email addr:gmail.com': 0.63; 'information': 0.63; 'real': 0.63; 'design,': 0.64; 'more': 0.64; 'different': 0.65; 'here': 0.66; 'design.': 0.68; 'soon.': 0.71; 'ranges': 0.74; 'potentially': 0.81; '2.7.': 0.84; 'choices:': 0.84; 'complaint': 0.84; 'norm': 0.84; 'received:fios.verizon.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Blog "about python 3" Date: Sun, 05 Jan 2014 17:48:43 -0500 References: <52c1dc4c$0$2877$c3e8da3$76491128@news.astraweb.com> <52C1F5EC.3020808@stoneleaf.us> <52c29416$0$29987$c3e8da3$5496439d@news.astraweb.com> <52c6415c$0$29972$c3e8da3$5496439d@news.astraweb.com> <52C6AD00.5050000@chamonix.reportlab.co.uk> <3519f85e-0909-4f5a-9a6e-09b6fd4c312d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-254-207.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: 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: 52 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388962139 news.xs4all.nl 2876 [2001:888:2000:d::a6]:43365 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63236 On 1/5/2014 9:23 AM, wxjmfauth@gmail.com wrote: > My examples are ONLY ILLUSTRATING, this FSR > is wrong by design, Let me answer you a different way. If FSR is 'wrong by design', so are the alternatives. Hence, the claim is, in itself, useless as a guide to choosing. The choices: * Keep the previous complicated system of buggy narrow builds on some systems and space-wasting wide builds on other systems, with Python code potentially acting differently on the different builds. I am sure that you agree that this is a bad design. * Improved the dual-build system by de-bugging narrow builds. I proposed to do this (and gave Python code proving the idea) by adding the complication of an auxiliary array of indexes of astral chars in a UTF-16 string. I suspect you would call this design 'wrong' also. * Use the memory-wasting UTF-32 (wide) build on all systems. I know you do not consider this 'wrong', but come on. From an information theoretic and coding viewpoint, it clearly is. The top (4th) byte is *never* used. The 3rd byte is *almost never* used. The 2nd byte usage ranges from common to almost never for different users. Memory waste is also time waste, as moving information-free 0 bytes takes the same time as moving informative bytes. Here is the beginning of the rationale for the FSR (from http://www.python.org/dev/peps/pep-0393/ -- have you ever read it?). "There are two classes of complaints about the current implementation of the unicode type: on systems only supporting UTF-16, users complain that non-BMP characters are not properly supported. On systems using UCS-4 internally (and also sometimes on systems using UCS-2), there is a complaint that Unicode strings take up too much memory - especially compared to Python 2.x, where the same code would often use ASCII strings...". The memory waste was a reason to stick with 2.7. It could break code that worked in 2.x. By removing the waste, the FSR makes switching to Python 3 more feasible for some people. It was a response to real problems encountered by real people using Python. It fixed both classes of complaint about the previous system. * Switch to the time-wasting UTF-8 for text storage, as some have done. This is different from using UTF-8 for text transmission, which I hope becomes the norm soon. -- Terry Jan Reedy