Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Never trust an operating system.


devel / comp.lang.python / Re: No right operator in tp_as_number?

SubjectAuthor
o Re: No right operator in tp_as_number?MRAB

1
Re: No right operator in tp_as_number?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: python@mrabarnett.plus.com (MRAB)
Newsgroups: comp.lang.python
Subject: Re: No right operator in tp_as_number?
Date: Sat, 20 Nov 2021 18:35:20 +0000
Lines: 15
Message-ID: <mailman.74.1637433509.19479.python-list@python.org>
References: <CABbU2U8CzKoXCTyOqxOnd4L86GmxupJQADSDGiLbR9qvX4tA8g@mail.gmail.com>
<9b672dcb-a4ff-1153-2b5d-58ffc0351b4c@mrabarnett.plus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de uQmLc2YSn2JlLYl2WP6IuQZzuIeWMnfdEBR5IvjBo6Ug==
Return-Path: <python@mrabarnett.plus.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=plus.com header.i=@plus.com header.b=UvF4p4kR;
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'this:': 0.03; "python's":
0.05; 'api,': 0.09; 'from:addr:python': 0.09; 'operators': 0.09;
'received:192.168.1.64': 0.09; 'from:addr:mrabarnett.plus.com':
0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com':
0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16;
'received:plus.net': 0.16; 'something?': 0.16; 'wrote:': 0.16;
'python': 0.16; 'to:addr:python-list': 0.20; 'seems': 0.26;
'example,': 0.28; 'header:User-Agent:1': 0.30; "doesn't": 0.32;
'received:192.168.1': 0.32; 'but': 0.32; 'there': 0.33; 'header
:In-Reply-To:1': 0.34; 'missing': 0.37; "it's": 0.37;
'received:192.168': 0.37; "there's": 0.61; 'came': 0.65; 'types':
0.67; 'that,': 0.67; 'right': 0.68; 'quick': 0.77; 'sulla': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019;
t=1637433321; bh=Ugc7pR/7eeX1J/BCPcsgD3VriOJAAbgs2Y0kTpm995c=;
h=Date:Subject:To:References:From:In-Reply-To;
b=UvF4p4kRKKVX8iCYyZQcUrw848V7nHzhMl1IpSgTbVvq4EHQO4XkHN6cNyrixjN9G
h/SWvi37M8C/bMFRKOKqcWVDTheoPp1mwqrm3l382k7xqD9NQiYR1x+mCvp4+m9mNI
NdD0Vv+VTvZ903eq7hKi7ohy1k+zd5W0hNbeztiJ2pGgceW1JXJgggKyUCyig3XeZE
fcgaGAciR3WDYWnIddkWg/HfAafQLijPLm8Z1Twk5bO2L1T7I1kErxUjpFEPbUZ1sH
HiYbvRnEXZ6A4c/gW5gv/c3MVSyDUgbOEhaDm/iM9s9DXTpxGlBRSdCPkz+l30OHzH
1IQYk+Abap5sA==
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=XLVT9StE c=1 sm=1 tr=0 ts=61993fe9
a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17
a=IkcTkHD0fZMA:10 a=8AHkEIZyAAAA:8 a=uPZiAMpXAAAA:8 a=aj4j7z9uGWH3xfLxAIYA:9
a=QEXdDO2ut3YA:10 a=cv9VcsDaJrIA:10 a=kKlv5diQZ1kA:10
X-AUTH: mrabarnett@:2500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.1
Content-Language: en-GB
In-Reply-To: <CABbU2U8CzKoXCTyOqxOnd4L86GmxupJQADSDGiLbR9qvX4tA8g@mail.gmail.com>
X-CMAE-Envelope: MS4xfNh8qDMv5DiRtpbbboRdGWAseMPfTi9Awsgg33CMMwImZlb2H6SwyYqNfLbW/lmK6miYcyaeqyfQil/UfRzHqNZwxbuforE3HqH8NOudB+gsrbpcmBz2
5e2lWpTxw4pR45zt6Q8AmbSi1nyeZky+A+1rQ7ckzJ5hBplXfhEI5JHN1nqIwaBFVNLQGJq0rHVmUB5CRukp2n010hmk3xGpptY=
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.37
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: <9b672dcb-a4ff-1153-2b5d-58ffc0351b4c@mrabarnett.plus.com>
X-Mailman-Original-References: <CABbU2U8CzKoXCTyOqxOnd4L86GmxupJQADSDGiLbR9qvX4tA8g@mail.gmail.com>
 by: MRAB - Sat, 20 Nov 2021 18:35 UTC

On 2021-11-20 17:45, Marco Sulla wrote:
> I checked the documentation:
> https://docs.python.org/3/c-api/typeobj.html#number-structs
> and it seems that, in the Python C API, the right operators do not exist.
> For example, there is nb_add, that in Python is __add__, but there's
> no nb_right_add, that in Python is __radd__
>
> Am I missing something?
>
A quick Google came up with this:

Python's __radd__ doesn't work for C-defined types
https://stackoverflow.com/questions/18794169/pythons-radd-doesnt-work-for-c-defined-types

It's about Python 2.7, but the principle is the same.


devel / comp.lang.python / Re: No right operator in tp_as_number?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor