Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.02; 'cpython': 0.05; 'ascii': 0.07; '32-bit': 0.09; 'destroyed.': 0.09; 'patches': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; 'bug': 0.10; '(the': 0.15; 'cases': 0.15; '(code': 0.16; '50)': 0.16; 'guessing': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'subject:unicode': 0.16; 'symbols,': 0.16; 'trap.': 0.16; 'unicode.': 0.16; 'url:browse_thread': 0.16; 'url:thread': 0.16; 'string': 0.17; 'wrote:': 0.17; 'char': 0.17; 'unicode': 0.17; '>>>': 0.18; 'discussion': 0.20; 'work,': 0.22; 'comment:': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'coding': 0.27; 'correct': 0.28; 'header:X -Complaints-To:1': 0.28; 'lines': 0.28; '"in': 0.29; '>>>>': 0.29; 'mind,': 0.29; 'table,': 0.29; 'character': 0.29; 'points': 0.29; 'probably': 0.29; "i'm": 0.29; 'related': 0.30; 'worked': 0.30; 'code': 0.31; 'point': 0.31; 'url:python': 0.32; 'from:addr:yahoo.co.uk': 0.32; "aren't": 0.33; 'maintained': 0.33; 'to:addr:python-list': 0.33; 'agree': 0.34; 'moved': 0.35; 'there': 0.35; 'add': 0.36; 'received:org': 0.36; 'characters': 0.36; 'enough': 0.36; 'possible': 0.37; 'optimization': 0.37; 'does': 0.37; 'previous': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'comment': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'bottom': 0.60; 'url:group': 0.60; 'range': 0.60; 'skip:u 10': 0.60; 'high': 0.61; 'subject:, ': 0.61; 'containing': 0.61; 'face': 0.61; 'lower': 0.61; 'provide': 0.62; 'between': 0.63; 'world': 0.63; 'subject:...': 0.63; 'email addr:gmail.com': 0.63; 'charset:windows-1252': 0.65; 'forward': 0.66; 'finally': 0.66; 'wish': 0.70; 'smith': 0.71; 'special': 0.73; 'beats': 0.84; 'believing': 0.84; 'complaint': 0.84; 'forced': 0.84; 'palette': 0.84; 'points,': 0.84; 'subject:, ...': 0.84; 'url:lang': 0.84; 'comment.': 0.91; 'received:2': 0.91; 'refuse': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Flexible string representation, unicode, typography, ... Date: Thu, 23 Aug 2012 15:18:05 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-2-98-202-33.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Antivirus: avast! (VPS 120823-0, 23/08/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 70 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345731438 news.xs4all.nl 6959 [2001:888:2000:d::a6]:39383 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27736 On 23/08/2012 13:47, wxjmfauth@gmail.com wrote: > This is neither a complaint nor a question, just a comment. > > In the previous discussion related to the flexible > string representation, Roy Smith added this comment: > > http://groups.google.com/group/comp.lang.python/browse_thread/thread/2645504f459bab50/eda342573381ff42 > > Not only I agree with his sentence: > "Clearly, the world has moved to a 32-bit character set." > > he used in his comment a very intersting word: "punctuation". > > There is a point which is, in my mind, not very well understood, > "digested", underestimated or neglected by many developers: > the relation between the coding of the characters and the typography. > > Unicode (the consortium), does not only deal with the coding of > the characters, it also worked on the characters *classification*. > > A deliberatly simplistic representation: "letters" in the bottom > of the table, lower code points/integers; "typographic characters" > like punctuation, common symbols, ... high in the table, high code > points/integers. > > The conclusion is inescapable, if one wish to work in a "unicode > mode", one is forced to use the whole palette of the unicode > code points, this is the *nature* of Unicode. > > Technically, believing that it possible to optimize only a subrange > of the unicode code points range is simply an illusion. A lot of > work, probably quite complicate, which finally solves nothing. > > Python, in my mind, fell in this trap. > > "Simple is better than complex." > -> hard to maintained > "Flat is better than nested." > -> code points range > "Special cases aren't special enough to break the rules." > -> special unicode code points? > "Although practicality beats purity." > -> or the opposite? > "In the face of ambiguity, refuse the temptation to guess." > -> guessing a user will only work with the "optimmized" char subrange. > ... > > Small illustration. Take an a4 page containing 50 lines of 80 ascii > characters, add a single 'EM DASH' or an 'BULLET' (code points > 0x2000), > and you will see all the optimization efforts destroyed. > >>> sys.getsizeof('a' * 80 * 50) > 4025 >>>> sys.getsizeof('a' * 80 * 50 + '•') > 8040 > > Just my 2 € (code point 0x20ac) cents. > > jmf > I'm looking forward to all the patches you are going to provide to correct all these (presumably) cPython deficiencies. When do they start arriving on the bug tracker? -- Cheers. Mark Lawrence.