Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Happiness is a hard disk.


devel / comp.lang.python / Is there a way to implement the ** operator on a custom object

SubjectAuthor
o Is there a way to implement the ** operator on a custom objectTony Flury

1
Is there a way to implement the ** operator on a custom object

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: tony.fl...@btinternet.com (Tony Flury)
Newsgroups: comp.lang.python
Subject: Is there a way to implement the ** operator on a custom object
Date: Thu, 8 Feb 2024 12:21:20 +0000
Lines: 12
Message-ID: <mailman.52.1707452284.3227.python-list@python.org>
References: <c40b43e5-12e7-4495-a876-10362a19007c@btinternet.com>
Reply-To: tony.flury@btinternet.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de B7YM1sJqONzzfUdAvkNygAqAdj3RxyexMNR0qkd/RCvw==
Cancel-Lock: sha1:o7M0lRfUyj3srBUlEQTLzIc37KQ= sha256:/nd63JzH4yeCQgERzNkCixReruMiXbfHQLp1oNFLiCE=
Return-Path: <tony.flury@btinternet.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=btinternet.com header.i=@btinternet.com header.b=mzAgPY0i;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: UNSURE 0.315
X-Spam-Level: ***
X-Spam-Evidence: '*H*': 0.55; '*S*': 0.18; 'generated': 0.03;
'subject:way': 0.16; 'developer': 0.16; 'to:addr:python-list':
0.20; 'object': 0.26; 'header:User-Agent:1': 0.30; 'default':
0.31; 'subject:there': 0.32; 'received:192.168.1': 0.32;
'received:192.168': 0.37; 'could': 0.38; 'received:213': 0.40;
'method': 0.61; 'email': 0.63; 'key': 0.64; 'choose': 0.67;
'reply-to:no real name:2**0': 0.78; 'header:Reply-To:1': 0.79;
'anthony': 0.84; 'keywords': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btinternet.com;
s=btmx201904; t=1707394881;
bh=s5HWnzr+qoLds5gA0CKxjKyHrItGtgpSMSPjP3h7krw=;
h=Message-ID:Date:MIME-Version:Reply-To:To:From:Subject;
b=mzAgPY0iX/qrsK0H94otRCdPj1ffPqqfaNKdPrxNEKLqNVR/0JedlD82CWQdn0WLWKvpNPZE8iCzVAQM1rZvgmXHaVoIOYWKgus0cvDLzeYciCh1PpLo5M+MycBboA+SbTUOsv5KgHdTQbVuc6QkMErKWmRI34ZfU6dMZMkLhXgAOAkUFJWGCX4zWTS8lKHVC5L3Bf+x3WWSR8rHYyO2TZpua3BBsBiN10+WtE0Ba31vG4m5idS0dYqo/fJNxyYwRqWChBqw3TgcuPhMyx/Fuc7DBccJ0FltpSBRt7V1qGY9CEzPO5Th6RlCB2i7CN0H393vzE+pCP9kMjYvboN9tg==
Authentication-Results: btinternet.com;
auth=pass (PLAIN) smtp.auth=tony.flury@btinternet.com;
bimi=skipped
X-SNCR-Rigid: 6577B7320764ABE5
X-Originating-IP: [81.147.64.245]
X-OWM-Source-IP: 81.147.64.245
X-OWM-Env-Sender: tony.flury@btinternet.com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvledrtdeggdefjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfrhfvhffutgfgsehtjeertddtvdejnecuhfhrohhmpefvohhnhicuhfhluhhrhicuoehtohhnhidrfhhluhhrhiessghtihhnthgvrhhnvghtrdgtohhmqeenucggtffrrghtthgvrhhnpeejkeeukeehkeeiudfhgedvveeuvdfhtdfgueeiteffieffhfeggfdvvedukeegffenucfkphepkedurddugeejrdeigedrvdegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrjeeingdpihhnvghtpeekuddrudegjedrieegrddvgeehpdhmrghilhhfrhhomhepthhonhihrdhflhhurhihsegsthhinhhtvghrnhgvthdrtghomhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehphihthhhonhdqlhhishhtsehphihthhhonhdrohhrghdprhgvvhfkrfephhhoshhtkeduqddugeejqdeigedqvdeghedrrhgrnhhgvgekuddqudegjedrsghttggvnhhtrhgrlhhplhhushdrtghomhdprghuthhhpghushgvrhepthhonhihrdhflhhurhihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfepifeupdfovfetjfhoshhtpehrvgdqphhrugdqrhhgohhuthdqtddt
fe
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-SNCR-hdrdom: btinternet.com
User-Agent: Mozilla Thunderbird
Content-Language: en-US
X-Mailman-Approved-At: Thu, 08 Feb 2024 23:18:04 -0500
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: <c40b43e5-12e7-4495-a876-10362a19007c@btinternet.com>
 by: Tony Flury - Thu, 8 Feb 2024 12:21 UTC

I know that mappings by default support the ** operator, to unpack the
mapping into key word arguments.

Has it been considered implementing a dunder method for the ** operator
so you could unpack an object into a key word argument, and the
developer could choose which keywords would be generated (or could even
generate 'virtual' attributes).

--
Anthony Flury
email : anthony.flury@btinternet.com

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor