Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

But what can you do with it? -- ubiquitous cry from Linux-user partner


devel / comp.lang.python / Re: Python C API: how to mark a type as subclass of another type

SubjectAuthor
o Re: Python C API: how to mark a type as subclass of another typeMarco Sulla

1
Re: Python C API: how to mark a type as subclass of another type

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

  copy mid

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

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: elbarbun@gmail.com (Marco Sulla)
Newsgroups: comp.lang.python
Subject: Re: Python C API: how to mark a type as subclass of another type
Date: Tue, 2 Nov 2021 14:00:20 +0100
Lines: 20
Message-ID: <mailman.171.1635858059.23718.python-list@python.org>
References: <CABbU2U9EbBES+CU3OwXqY_9T0LVT6rYUFzy3e-rebGQ53zHOyw@mail.gmail.com>
<24960.4963.376344.239230@ixdm.fritz.box>
<CABbU2U-zHmUeqHvdz5ESSvbY4hnV4mJdCANf01vbZacAPeXYHQ@mail.gmail.com>
<CABbU2U_Z4oxZjo5WADW7_jO1mvSwLg2s6w8tg69oKVbtuTsSfQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 0h3aH2CYQzmJRJO+91vRrA5FFG93St9hbqfG7bBEnn9Q==
Return-Path: <elbarbun@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=Q0nBxpdb;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.048
X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:API': 0.07;
'received:209.85.219': 0.09; 'subject:how': 0.09;
'subject:Python': 0.12; 'declared': 0.16; 'dieter': 0.16;
'from:name:marco sulla': 0.16; 'one?': 0.16; 'skip:> 10': 0.16;
'wrote:': 0.16; 'tue,': 0.19; 'to:addr:python-list': 0.20; 'skip:p
30': 0.23; 'tried': 0.26; 'message-id:@mail.gmail.com': 0.32;
'mark': 0.32; 'but': 0.32; "didn't": 0.34; 'work.': 0.34; 'header
:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'mon,': 0.36; 'received:209.85':
0.37; 'read': 0.38; 'received:209': 0.39; 'two': 0.39; 'added':
0.39; 'use': 0.39; 'wrote': 0.39; 'types': 0.67; 'right': 0.68;
'2021': 0.71; 'watch': 0.76; 'subject:another': 0.84; 'sulla':
0.84; 'subject:type': 0.91
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;
bh=KqnsnKQDhCjNMhK6HOt0tWlnm7iuRgsCwHyv/o/Ypbk=;
b=Q0nBxpdbBmDrvggVIGYR2YNhFJE6DzwCIapQyfQU+hwm218HIFaGhxRniYtceD/CIO
OJXndSKEwaxVThzhsIm6858PM9nx4xc2kXNLgHk+hpWGl0SFOFiDw03kHkj3Se6LKhaQ
/jzl/PaePLl6Cxsk/Y0wvVLsznDyT/ZsAP7+RQSTX+r825NMnKcdD6AbcAfL3LSzt+Gn
jQqZ5KYjX1J0/BTMzF63csYw3sNCp5Yp9j4efOPO1JbTSxDmFaTpvjrx5ADUyrUgoPX0
1z/t66UwuvKuTrEDmKn/Lv5R3ywxnI9Kcf4GK/OukQXpitgr8x0FChpBU2B/Pq4goFYc
vNQg==
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;
bh=KqnsnKQDhCjNMhK6HOt0tWlnm7iuRgsCwHyv/o/Ypbk=;
b=BDAIpVCzUMGzD0cCKBgMZJHaiynINpwPAZAknBQz+Q1+vAQdI4BGEGgJaSese0ZD5S
ubpWDK/eyMdusXpXSSLQhLNVaBHqY4nU2Swd4reicCIY4DLLcWvqQ/Ic3uD1aTIWE5yf
DlGCsa15aOPnHGmVjELbNx1uwiiCabmqZNhIGpYxOR3ECq3CqqoI4E9FigcuD3GxWsrz
uFXFJe3h750sqPZE8tWekQGT41P/MRlQpS2lZtMa+v3ZtulIgZVDVvGQOzRqup3+1P/A
0uIzm7fX6BepC0gHZ8FNA/iQiCd7Aw7zSEK6KIRh2mP5fp/DONPeZ7SBQVbkOAH/bBwY
Y4Jw==
X-Gm-Message-State: AOAM532RntBVou14L4Nlbj7yWf83b9fl24WH9SJBuSx9RqghVG7GLLqc
d4cYx22LCBP3Ii3wKHLbwfzmUBLDJntyefpJToq6H6NE
X-Google-Smtp-Source: ABdhPJzFgl4SZPbr5oP+5kKudOMbhdiU69qT82n8x/XbI5UBPgtBvd9OB9d5pYS6HUzZleRo2LjnHiTkiRgNvrLVVto=
X-Received: by 2002:a25:b687:: with SMTP id s7mr23561512ybj.28.1635858056080;
Tue, 02 Nov 2021 06:00:56 -0700 (PDT)
In-Reply-To: <CABbU2U-zHmUeqHvdz5ESSvbY4hnV4mJdCANf01vbZacAPeXYHQ@mail.gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
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: <CABbU2U_Z4oxZjo5WADW7_jO1mvSwLg2s6w8tg69oKVbtuTsSfQ@mail.gmail.com>
X-Mailman-Original-References: <CABbU2U9EbBES+CU3OwXqY_9T0LVT6rYUFzy3e-rebGQ53zHOyw@mail.gmail.com>
<24960.4963.376344.239230@ixdm.fritz.box>
<CABbU2U-zHmUeqHvdz5ESSvbY4hnV4mJdCANf01vbZacAPeXYHQ@mail.gmail.com>
 by: Marco Sulla - Tue, 2 Nov 2021 13:00 UTC

*ahem* evidently I didn't check the right package..... it works like a charme :D

On Tue, 2 Nov 2021 at 13:43, Marco Sulla <elbarbun@gmail.com> wrote:
>
> I already added the address of the type to tp_base, but it does not work.
>
> On Mon, 1 Nov 2021 at 17:18, Dieter Maurer <dieter@handshake.de> wrote:
> >
> > Marco Sulla wrote at 2021-10-31 23:59 +0100:
> > >I have two types declared as
> > >
> > >PyTypeObject PyX_Type = {
> > > PyVarObject_HEAD_INIT(&PyType_Type, 0)
> > >
> > >etc.
> > >
> > >How can I mark one of the types as subclass of the other one? I tried
> > >to use tp_base but it didn't work.
> >
> > Read the "Python/C Api" documentation. Watch out for `tp_base`.


devel / comp.lang.python / Re: Python C API: how to mark a type as subclass of another type

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor