Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I find you lack of faith in the forth dithturbing. -- Darse ("Darth") Vader


devel / comp.lang.python / Re: How to support annotations for a custom type in a C extension?

SubjectAuthor
o Re: How to support annotations for a custom type in a C extension?Serhiy Storchaka

1
Re: How to support annotations for a custom type in a C extension?

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: storchaka@gmail.com (Serhiy Storchaka)
Newsgroups: comp.lang.python
Subject: Re: How to support annotations for a custom type in a C extension?
Date: Sun, 19 Sep 2021 18:06:17 +0300
Lines: 9
Message-ID: <mailman.747.1632071901.4164.python-list@python.org>
References: <CABbU2U-XzTKOW2MfbYnEQKDKj9pMfZ8PAHrjLDX__e2FsHFp5w@mail.gmail.com>
<74a8da49-6966-62e1-d481-db350b69bed2@mrabarnett.plus.com>
<si4vf7$12b9$1@ciao.gmane.io>
<0638d578-f322-0b59-3af5-3d0927c1eeb2@mrabarnett.plus.com>
<si7jla$136h$1@ciao.gmane.io>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de Ziy0zTYVd/dt8BO0X2sKqwCEaCsPwax5lR7Pfm8pbvdg==
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.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'url-ip:140.82/16': 0.03;
'message-id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'url:github':
0.14; 'url-ip:140/8': 0.15; 'bugs.': 0.16; 'from:addr:storchaka':
0.16; 'from:name:serhiy storchaka': 0.16; 'received:116.202':
0.16; 'received:116.202.254': 0.16; 'received:116.202.254.214':
0.16; 'subject:extension': 0.16; 'url:cpython': 0.16;
'\xd0\xbf\xd0\xb8\xd1\x88\xd0\xb5:': 0.16; 'wrote:': 0.16;
'to:addr:python-list': 0.20; 'subject:How': 0.23; 'actual': 0.25;
'header:User-Agent:1': 0.30; 'subject:for': 0.33; 'header:In-
Reply-To:1': 0.34; 'from:addr:gmail.com': 0.35; 'received:116':
0.64; 'subject:support': 0.64; 'right': 0.68; 'casting': 0.84;
'type.': 0.84; 'fixed.': 0.91; 'subject:type': 0.91
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <0638d578-f322-0b59-3af5-3d0927c1eeb2@mrabarnett.plus.com>
Content-Language: en-US
X-Mailman-Approved-At: Sun, 19 Sep 2021 13:18:20 -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: <si7jla$136h$1@ciao.gmane.io>
X-Mailman-Original-References: <CABbU2U-XzTKOW2MfbYnEQKDKj9pMfZ8PAHrjLDX__e2FsHFp5w@mail.gmail.com>
<74a8da49-6966-62e1-d481-db350b69bed2@mrabarnett.plus.com>
<si4vf7$12b9$1@ciao.gmane.io>
<0638d578-f322-0b59-3af5-3d0927c1eeb2@mrabarnett.plus.com>
 by: Serhiy Storchaka - Sun, 19 Sep 2021 15:06 UTC

19.09.21 05:59, MRAB пише:
> On 2021-09-18 16:09, Serhiy Storchaka wrote:
>> "(PyCFunction)" is redundant, Py_GenericAlias already has the right
>> type. Overuse of casting to PyCFunction can hide actual bugs.
>>
> I borrowed that from listobject.c, which does have the cast.

Fixed. https://github.com/python/cpython/pull/28450


devel / comp.lang.python / Re: How to support annotations for a custom type in a C extension?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor