Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Real programs don't eat cache.


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

SubjectAuthor
o Re: for conveniencePaul Bryan

1
Re: for convenience

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: pbr...@anode.ca (Paul Bryan)
Newsgroups: comp.lang.python
Subject: Re: for convenience
Date: Mon, 21 Mar 2022 14:24:36 -0700
Lines: 28
Message-ID: <mailman.334.1647897864.2329.python-list@python.org>
References: <A779625E-5D40-410A-83C3-BA73E4108228@paulstgeorge.com>
<65a0bc8835d565657442d9cde09a1ee9c7c9b61b.camel@anode.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Nqkf4hR2Bltjf7mVhQVlLg5lYROqf4l/z74QoHyuTYCA==
Return-Path: <pbryan@anode.ca>
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=anode.ca header.i=@anode.ca header.b=hp3Ghp/s;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.067
X-Spam-Evidence: '*H*': 0.88; '*S*': 0.01; 'this:': 0.03; 'module.':
0.09; 'question:': 0.09; 'assuming': 0.16; 'received:10.202':
0.16; 'received:10.202.2': 0.16; 'received:64.147': 0.16;
'received:64.147.123': 0.16; 'received:internal': 0.16;
'received:messagingengine.com': 0.16; 'shorter': 0.16; 'wrote:':
0.16; 'to:addr:python-list': 0.20; '\xe2\x80\x94': 0.22; 'object':
0.26; 'creating': 0.27; 'header:User-Agent:1': 0.30; 'code,':
0.31; 'context': 0.32; 'subject:for': 0.33; 'same': 0.34; 'header
:In-Reply-To:1': 0.34; 'mon,': 0.36; 'use': 0.39; 'whenever':
0.40; 'reference': 0.60; 'george': 0.62; 'skip:b 10': 0.63;
'your': 0.64; 'forget': 0.67; 'received:64': 0.67; 'interpreted':
0.69; 'paul': 0.81; 'attribute': 0.84; 'referenced': 0.84;
'convenience': 0.91; 'here\xe2\x80\x99s': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anode.ca; h=cc
:content-type:date:date:from:from:in-reply-to:in-reply-to
:message-id:mime-version:references:reply-to:sender:subject
:subject:to:to; s=fm1; bh=7sIhzfXE1e+aqUYw9c6+H5KPrrUw8hUUfZu4qn
3BSU0=; b=hp3Ghp/sx25vVXwrHGJR+Va2vDmXaE1a/J8NaKlmCkIzHUJEy7TO9V
JVr7v4/YDdCU5tXxQ5eE0CVrxityDbEScOOm64I+1/iol4gJmloG8EFfLUUl4U1z
jntnajTp22vYl0IKY1rrjeQU5J3qJB/OnwM1Fu1Asj3Kltwc3d7WPl6qK4sD/Ykb
QfwRjYH7yA3sTeIBwlgghwHtS872tP7ZLzH2+G72KVUFoNkLsrUbpV4wevB380MW
uLgcOT0y6Mh2Y0VyZQJueweUkXhJNjXHBIO51LX/MBxVYYLVPwSaOWTu5rfc1H2/
Q3RlvzAJOpKqfJb3m3Fk/9sY9jpTolVA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:content-type:date:date:from:from
:in-reply-to:in-reply-to:message-id:mime-version:references
:reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=7sIhzfXE1e+aqUYw9
c6+H5KPrrUw8hUUfZu4qn3BSU0=; b=Biytns1w80isGO1YGXLnJHkOErrztQycd
Dt/8swBIJXKbtaGJxvh3hPs/bsCz2ZzsrOJxBIyVFHkX1AhFZAvctEZfe3WJb+IU
vXS5hmh5NTeq3TSWBTZYLbt+EmL/rFZbCR/ek+8ptIt5TgxNMQOdIYJDfiCOa2qL
6vIfnX7hZ/ifU542H11JhCWJJoH4NJ8uCZv5+gEQBY+KGXq4I5Ui1rFPxO1R9SvD
G+o47lRF9Jk7bKCID5IYEGYoZfNYIW4HeI6nFxXtceCvb9bPTiqoeBmGgAaMLYyS
lRY4dbSz7w5KtzfWPDtU3Lq8cCNnKoZX0NxFFa6BMz6SrQpt2mh6w==
X-ME-Sender: <xms:BO04YhgNZAgUg5P6pDf9zDobJXcZUbKRI1tynC_wk_jvLcI9UqbjAA>
<xme:BO04YmA_c6D2KxEV8JOlrR1rxyrg3hLDififpR0804rI1XNBw3eLlOYJ8nN0l_yOh
h3Bb-rQv0SVJD9OxG4>
X-ME-Received: <xmr:BO04YhGU4n_CYg9szP7cbcwJWq69281tx8ruuJsehyU76vgOO6l5_wfJBvVHf_1lsHSqjTU-RY7ugOU6ZDyIGVlGay5fjDvKRTYA2g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegfedgudehtdcutefuodetggdotefrod
ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
necuuegrihhlohhuthemuceftddtnecunecujfgurhepkffuhffvffgjfhgtfgggsegrtd
erredtreejnecuhfhrohhmpefrrghulhcuuehrhigrnhcuoehpsghrhigrnhesrghnohgu
vgdrtggrqeenucggtffrrghtthgvrhhnpedvtdetieekhfetlefgvdffieegteekkeevfe
egiefgteeijeeulefhfeehkeeigeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr
mhepmhgrihhlfhhrohhmpehpsghrhigrnhesrghnohguvgdrtggr
X-ME-Proxy: <xmx:BO04YmS9D4fHx0bU95h9N7zK6P1AEwfzxv-R__-sVXw3L5QkdW0_9w>
<xmx:BO04Yuw_TzKG4uQ006DzGuxzVO-e5f-LL42P4mCdLlRgYd-akGvqDA>
<xmx:BO04Ys7borWT5hWESNnFr-FZM5ZceRfPiFpi_YuA5yg-Jzyfyqc5gw>
<xmx:BO04YkbC7VNGtPA3oaeUaH7v3uhvMm8wzUbHt4_NWeco3dlGhhnlBg>
In-Reply-To: <A779625E-5D40-410A-83C3-BA73E4108228@paulstgeorge.com>
User-Agent: Evolution 3.42.4
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
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: <65a0bc8835d565657442d9cde09a1ee9c7c9b61b.camel@anode.ca>
X-Mailman-Original-References: <A779625E-5D40-410A-83C3-BA73E4108228@paulstgeorge.com>
 by: Paul Bryan - Mon, 21 Mar 2022 21:24 UTC

Assuming `bpy` is a module, you're creating a new attribute in your
module, `context`, that contains a reference to the same object that is
referenced in the `context` attribute in the `bpy` module.

On Mon, 2022-03-21 at 22:12 +0100, Paul St George 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?
>
>
> —
> Paul St George
>
>
>
>
>

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor