Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

To be is to program.


devel / comp.lang.python / Re: imaplib: is this really so unwieldy?

SubjectAuthor
o Re: imaplib: is this really so unwieldy?Chris Angelico

1
Re: imaplib: is this really so unwieldy?

<mailman.377.1622138774.3087.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=13382&group=comp.lang.python#13382

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: imaplib: is this really so unwieldy?
Date: Fri, 28 May 2021 04:06:01 +1000
Lines: 23
Message-ID: <mailman.377.1622138774.3087.python-list@python.org>
References: <21fb6c5f-97a4-654b-887f-2c31a549bcbe@adminart.net>
<hd6qag98c37mvqurlu3mfcvie38o63kn6n@4ax.com>
<d0e29810-858a-8a32-fda6-a68c63224606@mrabarnett.plus.com>
<s8jcne$h9u$1@ciao.gmane.io>
<CAPTjJmoc-zTeUs_4WfAt-Wacr5XitX0ffUZw6Zu=7xMGy5xzkQ@mail.gmail.com>
<20210527180257.GB1117@hjp.at>
<CAPTjJmrmHpOUUySPD5y5YWox2oswCdrAT0yonLMiyqN1-fddFw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de VnhfULX8fRWRwTASnqDKEwHwp94Z88g51YgJA5dTHZ9w==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=QxkQF6Bv;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.025
X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'chances': 0.05; 'string':
0.05; 'angelico': 0.09; 'characters,': 0.09; 'text.': 0.09;
'chrisa': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris
angelico': 0.16; 'holzer': 0.16; 'oh,': 0.16; 'right.': 0.16;
'width,': 0.16; 'wrote:': 0.16; 'memory': 0.16; "aren't": 0.20;
'fri,': 0.23; 'to:addr:python-list': 0.23; 'chris': 0.26;
'single': 0.28; 'text': 0.29; 'there': 0.31; 'but': 0.31; 'wide':
0.31; 'to:name:python': 0.32; 'message-id:@mail.gmail.com': 0.33;
'received:209.85.166': 0.33; 'header:In-Reply-To:1': 0.33;
'received:google.com': 0.34; 'yes,': 0.35; 'from:addr:gmail.com':
0.35; 'cases': 0.37; 'people': 0.37; 'couple': 0.37;
'received:209.85': 0.38; 'received:209': 0.38; 'use': 0.38;
'english': 0.61; 'skip:o 10': 0.62; 'lot': 0.62; 'subject:this':
0.63; 'cost': 0.64; 'exactly': 0.69; "you'll": 0.75; '2021': 0.84;
'happen,': 0.84; 'subject:really': 0.84; 'hundred': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:content-transfer-encoding;
bh=OPgCdlgydXrChm22Th2JJgwFKc6wVxkfFZYmHF14sdM=;
b=QxkQF6BvRlOKsEwQLn0BOxd75RE7EHnQrV1FaAdAfeikXxnDXV4wOfwF+Fcc3ybYvY
IBG+BRcFRmPZWKfn4bc2eydqfjJQwn3AFQX70XzDZNdhfuo+GM/6XabmYHkjTfmCzsEL
Bo6sf/8KG3VDzGMGnGab+iFRDhVUyA4QLB1Zkib5ooWtxapvwj0AoK2vEJtcFpxJibsG
owr5f2iL75yu0NGCj+F+X8LiVRNx8x3O2UmR+5UTFFNmr9JOGhJcuKcyj26DaaCjVFrV
oavhipKQHiWdLbgtlPi05WfrtcSP8ObC/eb9JF2Irsn5VY3CgikDJU5mjmkQWuthbail
eaDQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-transfer-encoding;
bh=OPgCdlgydXrChm22Th2JJgwFKc6wVxkfFZYmHF14sdM=;
b=DWlCREmWz3DzaTo+OCYT1OqkxJRIQMSIABlWNodFiUuZyDELPUlSsLGngSx9mKJMwp
7v9YQsxZIWocJx73k3bftXMczjXp90jxl6rgzKCYY0Js/oRk5U/KlOx6rc7tcHQgWQ1e
GHANBLnW6HPIahWT+2JngDqCQWMNymgbHy2wBVi/08zEQuaKPvw2H4cIjECM82Mobfah
pzrwkUMW3TExcsfR4gaIdMJVV6uGQM+IkAhFtwkEKX6o1KVkNOCR4sr/uSxwqhtYKgJf
KHOfE8G9rnRXfUEi478AQICpaKghYdkvQQIknxhO4reF868sGPJ/1MB6+hFUcJF1pkVq
35Ng==
X-Gm-Message-State: AOAM5311KFM1Pc+Ol3J2fgHBSNOoELez8o+wkEeIXPcYVergbjQPWMP6
mNduvHQMytD2YQKY2N08NjP8bAu2zWBZgHDba7loPquPBBVA1w==
X-Google-Smtp-Source: ABdhPJwn3cz0Iu+vFz+yMoJKJTxttLDFaePKS08kY5IfmayOqnGt5dzdv3cOq1II1XWCRFwNJidnu77ZIJlvk53ZBl8=
X-Received: by 2002:a05:6e02:1d1a:: with SMTP id
i26mr4098306ila.180.1622138772364;
Thu, 27 May 2021 11:06:12 -0700 (PDT)
In-Reply-To: <20210527180257.GB1117@hjp.at>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmrmHpOUUySPD5y5YWox2oswCdrAT0yonLMiyqN1-fddFw@mail.gmail.com>
X-Mailman-Original-References: <21fb6c5f-97a4-654b-887f-2c31a549bcbe@adminart.net>
<hd6qag98c37mvqurlu3mfcvie38o63kn6n@4ax.com>
<d0e29810-858a-8a32-fda6-a68c63224606@mrabarnett.plus.com>
<s8jcne$h9u$1@ciao.gmane.io>
<CAPTjJmoc-zTeUs_4WfAt-Wacr5XitX0ffUZw6Zu=7xMGy5xzkQ@mail.gmail.com>
<20210527180257.GB1117@hjp.at>
 by: Chris Angelico - Thu, 27 May 2021 18:06 UTC

On Fri, May 28, 2021 at 4:04 AM Peter J. Holzer <hjp-python@hjp.at> wrote:
>
> On 2021-05-26 08:34:28 +1000, Chris Angelico wrote:
> > Yes, any given string has a single width, which makes indexing fast.
> > The memory cost you're describing can happen, but apart from a BOM
> > widening an otherwise-ASCII string to 16-bit, there aren't many cases
> > where you'll get a single wide character in a narrow string.
>
> A single emoji in a long English text.
>
> > Usually, if there are any wide characters, there'll be a good number
> > of them
>
> Oh, right. People who use emoji usually use a lot of them 😉.
>
>

Exactly :) I can easily imagine a short block of text with just one
(say, a single email), but if you have a gigabyte or even a couple
hundred meg of text, the chances of *a single* emoji become
vanishingly slim.

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor