Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'things.': 0.05; 'ascii': 0.07; 'mentioned,': 0.07; 'subject:How': 0.09; 'python': 0.09; 'here?': 0.09; 'namespace': 0.09; 'pep': 0.09; 'subject:()': 0.09; 'subject:string': 0.09; 'subject:using': 0.09; 'aug': 0.13; 'do,': 0.15; '(am': 0.16; 'ah,': 0.16; 'costs.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'guys,': 0.16; 'lookups': 0.16; 'subject:unicode': 0.16; 'subject:variable': 0.16; 'wrote:': 0.17; 'string,': 0.17; 'received:209.85.214.174': 0.21; '3.2': 0.22; 'header:In-Reply- To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'routine': 0.29; "i'm": 0.29; 'idle': 0.33; 'to:addr:python-list': 0.33; 'operations': 0.33; 'received:google.com': 0.34; 'open': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'compare': 0.36; 'skip:p 20': 0.36; 'detail': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'performance': 0.39; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'gone': 0.64; 'great': 0.64; 'guaranteed': 0.76; 'subject:value': 0.84; 'period.': 0.95 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=9how5soefM1r4uPNpIWUlcwCTm0NqSeoCReYjDkBM+4=; b=W/UkMHtaDHLOYKMtCfJcCW24cAb59tjmBFfE/NV8rzD6XZZOWdlm0lM9uciESCT5Lf Kla64GQdpLAAXSRuwTXyzyon9HsZ9kttrgPEOWUjA+QbH6asJ4I6CnTJyfbjncxn6QOz iU60T9UTvVVtnyK6P5W32gLzC0Q1tWdTfm8zeg2F8eoRV/aWA5nzyiGLm75EX//n/0lK WB61nfSbyXzCvjfIzOGt51jP38MGySBe6n1qlYZmuA+afetQTlolUF+6JR80iSELDv/d LOfZWK8paNyLnDDmNb+wR1Vl3K18qJCQDu76FOd5Tl7bnN8RkcFk7rIsTbbTLamqZBmB Hntw== MIME-Version: 1.0 In-Reply-To: <4c62a649-bc21-4e47-9c0f-acb1b1e70e36@googlegroups.com> References: <308df2af-abe7-4043-b199-0a39f440e0ab@googlegroups.com> <502f8a2a$0$29978$c3e8da3$5496439d@news.astraweb.com> <4c62a649-bc21-4e47-9c0f-acb1b1e70e36@googlegroups.com> Date: Sun, 19 Aug 2012 02:57:33 +1000 Subject: Re: How do I display unicode value stored in a string variable using ord() 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.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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345309057 news.xs4all.nl 6973 [2001:888:2000:d::a6]:40267 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27312 On Sun, Aug 19, 2012 at 2:38 AM, wrote: > Sorry guys, I'm not stupid (I think). I can open IDLE with > Py 3.2 ou Py 3.3 and compare strings manipulations. Py 3.3 is > always slower. Period. Ah, but what about all those other operations that use strings under the covers? As mentioned, namespace lookups do, among other things. And how is performance in the (very real) case where a C routine wants to return a value to Python as a string, where the data is currently guaranteed to be ASCII (previously using PyUnicode_FromString, now able to use PyUnicode_FromKindAndData)? Again, I'm sure this has been gone into in great detail before the PEP was accepted (am I negative-bikeshedding here? "atomic reactoring"???), and I'm sure that the gains outweigh the costs. ChrisA