Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"No problem is so formidable that you can't walk away from it." -- C. Schulz


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

SubjectAuthor
o Re: imaplib: is this really so unwieldy?Grant Edwards

1
Re: imaplib: is this really so unwieldy?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: grant.b....@gmail.com (Grant Edwards)
Newsgroups: comp.lang.python
Subject: Re: imaplib: is this really so unwieldy?
Date: Wed, 26 May 2021 06:02:37 -0000 (UTC)
Lines: 32
Message-ID: <mailman.354.1622010023.3087.python-list@python.org>
References: <21fb6c5f-97a4-654b-887f-2c31a549bcbe@adminart.net>
<YKzFm7gR+5eKzov7@cskk.homeip.net>
<d4d433ff-5de6-31df-4234-e93feea454fc@adminart.net>
<14hqag1k3ujs43uij6rig68vckqo97j386@4ax.com>
<s8ko9s$ldk$1@ciao.gmane.io>
X-Trace: news.uni-berlin.de WBJENj4u+6OFxeWk+2BQCwv76VkjG74PPXBHF/3CtEBg==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'variable': 0.05; 'message-
id:@ciao.gmane.io': 0.09; 'ok,': 0.09; 'received:ciao.gmane.io':
0.09; 'received:gmane.io': 0.09; 'received:list': 0.09; 'import':
0.14; '+0200,': 0.16; '3.8.2': 0.16; '>>>>': 0.16;
'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards':
0.16; 'ideal.': 0.16; 'received:116.202': 0.16;
'received:116.202.254': 0.16; 'received:116.202.254.214': 0.16;
'skip:> 10': 0.16; 'wrote:': 0.16; 'python': 0.16; 'grant': 0.17;
'tue,': 0.18; "i've": 0.22; 'to:addr:python-list': 0.23;
'library': 0.27; 'module': 0.28; '(and': 0.30; 'header:User-
Agent:1': 0.31; 'assume': 0.32; 'fine.': 0.32; 'program': 0.33;
'programs.': 0.35; 'from:addr:gmail.com': 0.35; 'way': 0.37;
'use': 0.38; 'url-ip:151.101.36.223/32': 0.38; 'url-
ip:151.101.36/24': 0.38; 'programs': 0.40; 'subject:this': 0.63;
'right': 0.66; 'during': 0.67; 'site': 0.69; 'received:116': 0.71;
'global': 0.72; '2021': 0.84; 'subject:really': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: slrn/1.0.3 (Linux)
X-Mailman-Approved-At: Wed, 26 May 2021 02:20:21 -0400
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: <s8ko9s$ldk$1@ciao.gmane.io>
X-Mailman-Original-References: <21fb6c5f-97a4-654b-887f-2c31a549bcbe@adminart.net>
<YKzFm7gR+5eKzov7@cskk.homeip.net>
<d4d433ff-5de6-31df-4234-e93feea454fc@adminart.net>
<14hqag1k3ujs43uij6rig68vckqo97j386@4ax.com>
 by: Grant Edwards - Wed, 26 May 2021 06:02 UTC

On 2021-05-25, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
> On Tue, 25 May 2021 19:21:39 +0200, hw <hw@adminart.net> declaimed the
> following:
>
>
>>
>>Oh ok, it seemed to be fine. Would it be the right way to do it with
>>sys.exit()? Having to import another library just to end a program
>>might not be ideal.
>
> I've never had to use sys. for exit...
>
> C:\Users\Wulfraed>python
> Python ActivePython 3.8.2 (ActiveState Software Inc.) based on
> on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> exit()
>
> C:\Users\Wulfraed>python

According to the docs (and various other sources), the global variable
"exit" is provided by the site module and is only for use at the
interactive prompt -- it should not be used in programs.

https://docs.python.org/3/library/constants.html#exit

I get the impression that real programs should not assume that the
site module has been pre-loaded during startup.

--
Grant

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor