From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2YLWMhDyoWn24wwAWB0awg (envelope-from ) for ; Fri, 27 Feb 2026 14:35:44 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=comcast.net header.i=@comcast.net header.a=rsa-sha256 header.s=20190202a header.b=IR81u7Ni; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CB2B71E0DD; Fri, 27 Feb 2026 14:35:44 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EC0FC1E089 for ; Fri, 27 Feb 2026 14:35:43 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 6A33E4BA23CE for ; Fri, 27 Feb 2026 19:35:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A33E4BA23CE Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=comcast.net header.i=@comcast.net header.a=rsa-sha256 header.s=20190202a header.b=IR81u7Ni Received: from resqmta-a2p-658780.sys.comcast.net (resqmta-a2p-658780.sys.comcast.net [IPv6:2001:558:fd01:2bb4::5]) by sourceware.org (Postfix) with ESMTPS id 9E3274BA23C5 for ; Fri, 27 Feb 2026 19:35:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E3274BA23C5 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=comcast.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=comcast.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9E3274BA23C5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:558:fd01:2bb4::5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772220918; cv=none; b=pgu2DfZAbg3UeCGKmxAoIwHUzah3QtBfFz4oKIm3/DAcecdf2vCYZ8bO9/wvSjtBadTjdgEc2sWq6iNGVbuXsESOAg6c3epiHtCsiKV3CnjyLeNU31w6SvuF6qpDDvFt+2JZPZ5/lPL+S4Wx/zjHPiTqh9/E3ZyhTKxZDSvzLBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772220918; c=relaxed/simple; bh=WCdO8EnxkLJgVxT6IkBVZwOBGvob5DgoyLrP4+4fpRQ=; h=DKIM-Signature:Mime-Version:Subject:From:Date:Message-Id:To; b=M69otQTLrim8/PwcNLzdhAsfKrVTAm37+uku+3TDRKiYunpQEhEPLalAoW2XY2Q2ykdDP8Hb6exA7qhqtryRgaIxi+whCP/xQsxULj943BYUOZKmxKVOnEszGurhuzF/ElG4F6WhUhJQTYfVSY62k2XKEKYF9wYBDVuGuhMfYKs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E3274BA23C5 Received: from resomta-a2p-647974.sys.comcast.net ([96.103.145.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-a2p-658780.sys.comcast.net with ESMTPS id w3ELvDsd6az7Dw3cJvknFd; Fri, 27 Feb 2026 19:35:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1772220917; bh=QZjntXA6b3pPXkiA7sqJu5+J182QhREaH8QE4PFhuMU=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To:Xfinity-Spam-Result; b=IR81u7NiPHyI4uyTUWVfn+YjIYloxrTRc+lX6nE++zHj0BC9TqGEoGqJqmuDrM56H VbBkoBHjmqIszeHEypqatrYIcgcgvAFwk2Hz5wq2QC+Dp3Ks/7tS6tlNti+39RDumz ynO/CMXSEu5aeYVZMnAl/XGsjyYQumz7ynP3oVXK5LSOLvSunXPQRO1GqvnyK6BNMf eezvCHKNd5Sk2FxTzeDeuzr4mLqvnk9ybqw+IbKhwLdjZ/MgyqbaIZDGL5u5R9suy4 zOIi8KqjlMySbszoGwvDKH9P3RXbLoDL8Eu4hdgzq7jnPRw0fDsl9vzfEzap1IGv/4 uWPzfMj3cqYjQ== Received: from smtpclient.apple ([73.60.223.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-a2p-647974.sys.comcast.net with ESMTPSA id w3cGvnXmLiu1Zw3cGvokbL; Fri, 27 Feb 2026 19:35:14 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: [PATCH] Use the "O!" format more in the Python code From: Paul Koning In-Reply-To: <87qzq6t4vy.fsf@tromey.com> Date: Fri, 27 Feb 2026 14:35:01 -0500 Cc: Tom de Vries , gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <283854B8-3788-43DB-991A-DEDF4CB56387@comcast.net> References: <20260227164843.2275912-1-tom@tromey.com> <87qzq6t4vy.fsf@tromey.com> To: Tom Tromey X-Mailer: Apple Mail (2.3826.700.81.1.4) X-CMAE-Envelope: MS4xfN+3VrEnLywLHJhFn3Tm+KUuxSDJX+FzKuzlwks6zggQiE64ekNNt87qGn9OmW/bkWa4DmxRHMITKED8q3FlHfMFKCp1XV8qn/958hYiNbkGINtQhHmi YBvESazWo6ZOV2r6hIpIeXI6TQiiDKyI4QpSm2uPbknzoZVSczAa1IUYuwd3v8SubE4M6pBp0CszU24fBLkQmJyZ7AFBCF64AQmb0NFwlYmjGTnTSQlW+jhJ q1Oeiq+SEYyg+Vk2EQTe0w== X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > On Feb 27, 2026, at 1:31=E2=80=AFPM, Tom Tromey = wrote: >=20 >>>>>> "Tom" =3D=3D Tom de Vries writes: >=20 > Tom> I saw other direct comparisons to recpy_insn_type in the code, = and > Tom> wondered if those should likewise allow subclasses using > Tom> PyObject_TypeCheck. >=20 > Tom> But I suppose we just assume there are no subclasses? >=20 > I'm not sure if you can subclass an instruction type (I thought = perhaps > we needed special code in the type definition to support subclassing), > but if you can, then it should be usable here. >=20 > Tom Agreed. The Python Way is that subclasses of a type can be used where a = given type is expected. Also, any type can be subclassed. That last = point is not true for types defined in C code, unless the code allows it = to happen. In general it should do so; it's very rare indeed for it to = be "the right thing" for a type not to allow subclasses. paul=