Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Confound these ancestors.... They've stolen our best ideas!" -- Ben Jonson


devel / comp.lang.python / Re: for convenience

SubjectAuthor
o Re: for convenienceChris Angelico

1
Re: for convenience

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

  copy mid

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

  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: for convenience
Date: Tue, 22 Mar 2022 08:17:32 +1100
Lines: 29
Message-ID: <mailman.333.1647897466.2329.python-list@python.org>
References: <A779625E-5D40-410A-83C3-BA73E4108228@paulstgeorge.com>
<CAPTjJmr04OXW4k76Xa_9xd8p93gxzARUZUyUk6ehu-x53m2=ig@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 m4HC6aQGKI6PQPRfcOxy+A5ospPWXlYMbD2aBFM2bvjA==
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=aZYwl5PF;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.030
X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'this:': 0.03; '2022':
0.05; 'variable': 0.05; 'else.': 0.07; 'mar': 0.07; 'question:':
0.09; 'chrisa': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris
angelico': 0.16; 'presumably': 0.16; 'shorter': 0.16; 'wrote:':
0.16; 'name.': 0.19; 'tue,': 0.19; 'to:addr:python-list': 0.20;
'anything': 0.25; 'creating': 0.27; 'local': 0.27; 'code,': 0.31;
'effect': 0.31; 'context': 0.32; 'happening': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'but': 0.32; 'subject:for': 0.33;
'same': 0.34; 'header:In-Reply-To:1': 0.34; 'received:google.com':
0.34; 'question.': 0.35; 'from:addr:gmail.com': 0.35; "it's":
0.37; 'received:209.85': 0.37; 'received:209': 0.39; 'use': 0.39;
'happen': 0.40; 'whenever': 0.40; "there's": 0.61; 'george': 0.62;
'here': 0.62; 'skip:b 10': 0.63; 'named': 0.65; 'forget': 0.67;
'interpreted': 0.69; 'refers': 0.69; 'paul': 0.81; 'assignment,':
0.84; 'convenience': 0.91; 'here\xe2\x80\x99s': 0.93; 'magic':
0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:content-transfer-encoding;
bh=DbWuGJgPTJW7dUI4qD2D6ULjRnwnmi5qr0yCTGsLvf0=;
b=aZYwl5PFcg+lJ5jii0SUXT6rblMAMjfZyzOY2MJqdlPer2Z0M7sG2Mc5XlPXIl3w/u
mxJ7wsVwf9H95Y0T3mYfJLYSx8EL/knS7javvLmNa9OPCApfnMdYASl1rkGEfiRXur4r
2/LRZ3UoLCcFUz9msCqifzxY3snOBTQU2lWb6+ZnKXNef/C+0S3zUjmS3evMQAqjNAcA
4PVfFMHV5ak+ZsX1siaQf34IhhFE4Aj5Cywj3pDG5LoNmGy/xtQGn8q/ThV9cYEMAARP
UdermMuBAEwo2kqo7gEhqvERQ2boTwEdgu6HL3nBOXIpqbKGQgVBHL+jxe5D8vvq5bvB
Zb/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:content-transfer-encoding;
bh=DbWuGJgPTJW7dUI4qD2D6ULjRnwnmi5qr0yCTGsLvf0=;
b=YGwBn6BT7NHmGWMQONhxV4iv1lkqdtMej3de9ZVtHntFtyp/gqaqcdtL6O/FoynXrU
3tTrksSZrm1kcm+JuQHzomngBL0zYcb2yl9het2yuoyotfnHYHEC5SZiNUP+xKrtwk3Y
AInQG2z/oYEdS2b0XSHkjiK/hr0D+OJ2OBbjXXQTtF1ATtEic06vgseaQ8z5PE8kW2jw
fWGYYDYg1900TNaz+IIbC10cuDe348KQ8132nvttAD5eMZEks84w9yIMAWVrzDz7c9Eg
ABgVTYYgqEFz1TuSCncM7tt+qPdzsYS+ZJf0aUVnNamRuGJh15oYm3/DuHM2nhbrqdgr
dj3w==
X-Gm-Message-State: AOAM5309pTDUdR2/Q0+U+bkJW1FbLj3cMmnWiA3SdYBsmcyHdCt3GY/3
QP/ZwbTOjby61PCPrbbDDTZYIJ/XBiAsXZdKEfVjxBVr
X-Google-Smtp-Source: ABdhPJyNWyM1CFb8lDdy6dUNbdPFG4zfI6+KZ5SsWMhonpYL2Ga21uHkDpidx8fMKIw8B/lchnIUGuTVaFlSrXUG7TE=
X-Received: by 2002:a5d:6092:0:b0:203:f860:a84 with SMTP id
w18-20020a5d6092000000b00203f8600a84mr13340387wrt.160.1647897463577; Mon, 21
Mar 2022 14:17:43 -0700 (PDT)
In-Reply-To: <A779625E-5D40-410A-83C3-BA73E4108228@paulstgeorge.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <CAPTjJmr04OXW4k76Xa_9xd8p93gxzARUZUyUk6ehu-x53m2=ig@mail.gmail.com>
X-Mailman-Original-References: <A779625E-5D40-410A-83C3-BA73E4108228@paulstgeorge.com>
 by: Chris Angelico - Mon, 21 Mar 2022 21:17 UTC

On Tue, 22 Mar 2022 at 08:13, Paul St George <email@paulstgeorge.com> wrote:
>
>
> When I am writing code, I often do things like this:
>
> context = bpy.context # convenience
>
> then whenever I need bpy.context, I only need to write context
>
>
> Here’s my question:
>
> When I forget to use the convenient shorter form
>
> why is bpy.context not interpreted as bpy.bpy.context?
>

I don't understand the question. When you do that "for convenience"
assignment, what you're doing is creating a local variable named
"context" which refers to the same thing that bpy.context does (or did
at the time of the assignment, but presumably you only do this when
bpy.context won't get reassigned). It has no effect on any other name.
There's no magic happening here - it's just assignment to the name
context, like anything else.

What are you expecting to happen here?

ChrisA

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor