Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'subject:Python': 0.06; 'sys': 0.07; 'string': 0.09; 'bits': 0.09; 'used.': 0.09; 'python': 0.11; '3.3,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hmm.': 0.16; 'modules.': 0.16; 'ought': 0.16; 'sorts': 0.16; 'width.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; "i've": 0.25; 'query': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'characters': 0.30; 'message-id:@mail.gmail.com': 0.30; 'long.': 0.31; 'probably': 0.32; "we're": 0.32; 'actual': 0.34; "i'd": 0.34; "can't": 0.35; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'curious': 0.36; 'object,': 0.36; 'representing': 0.36; 'method': 0.36; 'two': 0.37; 'list': 0.37; 'level': 0.37; 'received:209': 0.37; 'problems': 0.38; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'easy': 0.60; 'simple': 0.61; 'skip:n 10': 0.64; 'talking': 0.65; '"can': 0.84; 'difference.': 0.84; 'subject:long': 0.84; 'audit': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=7h8L5qRGY3UQZmP8/ugKE51qdaUIJ+ldXjY0v7B3PMc=; b=YClXJCFwdi43Kzqya/1mRXeFb9zirKNDOlxnkkveHduDtne8QdofqCwQs/a5OoQv3z 0sxdKNXAPBwyrRmgeyNqu0ufV/FkZJevVz1hGhvwFSSoTqdKGLg9jrWxjzP10aWPS4vC d1cTkaXzX3gFCENpPTPN4JjWQYBi+svVMPuazA6UVImM6POA4uqEMUBKGDb+9ul2anoj T0+rFaPzQ+dIGgd5WuvVNPcaoaEQYEdvCy+xlNNotmCrmC7MUbm0b+hvnWG+s+pT9oRp OgAE/nVfQJ/I6ChG7z3oKHEuweZuzk8DzZ7thtRpt2hD3MoGbyPL8pRpEyOfslw2IVDa uxBA== MIME-Version: 1.0 X-Received: by 10.52.16.211 with SMTP id i19mr240232vdd.91.1364971942069; Tue, 02 Apr 2013 23:52:22 -0700 (PDT) In-Reply-To: References: <515941d8$0$29967$c3e8da3$5496439d@news.astraweb.com> <5159beb6$0$29967$c3e8da3$5496439d@news.astraweb.com> <4103dc28-a0dc-4740-bb38-b6bcb58bedfb@h1g2000vbx.googlegroups.com> <87dff083-14d8-4163-89f3-d78a9be6c802@c15g2000vbl.googlegroups.com> <3qadncD4-6fcPsbMnZ2dnUVZ_rqdnZ2d@westnet.com.au> <515bbedb$0$29891$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 3 Apr 2013 17:52:21 +1100 Subject: Re: Performance of int/long in Python 3 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.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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364971944 news.xs4all.nl 6897 [2001:888:2000:d::a6]:59973 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42636 On Wed, Apr 3, 2013 at 5:29 PM, Neil Hodgson wrote: > Chris Angelico: > > >> I'd be curious to know the sorts of characters used. Given that it's >> probably a narrow-vs-wide Python difference we're talking here, the >> actual distribution of codepoints may well make a difference. > > > I was going to upload it but then I thought of potential client > -confidentiality problems and the need to audit a list that long. Hmm. I was about to say "Can you just do a quick collections.Counter() of the string widths in 3.3, as an easy way of seeing which ones use BMP or higher characters", but I can't find a simple way to query a string's width. Can't see it as a method of the string object, nor in the string or sys modules. It ought to be easy enough at the C level - just look up the two bits representing 'kind' - but I've not found it exposed to Python. Is there anything? ChrisA