From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Vv/pGon3oWnh6QwAWB0awg (envelope-from ) for ; Fri, 27 Feb 2026 14:59:05 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=XJqv6ScF; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 33E851E0DD; Fri, 27 Feb 2026 14:59:05 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,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 E3B9D1E089 for ; Fri, 27 Feb 2026 14:59:03 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 5E23B4BA23FF for ; Fri, 27 Feb 2026 19:59:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E23B4BA23FF Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=XJqv6ScF Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 5F1EF4BA2E09 for ; Fri, 27 Feb 2026 19:58:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F1EF4BA2E09 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5F1EF4BA2E09 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772222314; cv=none; b=RHilz9fp1V/uBD10eP7ivdN5/7CJIczFvxIfrJ2b7e7llXMdG+ksjq/NBM8LC5gvMSt7MVjB7S2U+jURz6bZSILrQNJ38lcjXopG8ku7mx+zJ1kkvSYqHbWnsj1ZEIcvmHIUvoZ/2PnPpx5qOgpOoFq4F8Lawxp+NsIymwjVm9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772222314; c=relaxed/simple; bh=6gwmRXGQDVUwDGW2CO3mC9VJV0fMlD9Y9jilJUFporQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=U71fOg0m41Bx3eha/2IjyDP4/M2aJPN/+hcduOAUNMQ9JaDY8+JHfaNdbAj6wO9Fi/u0LK26EhSux74aKqWuog3AQvxbCffehJLNW+v+57AwUVT4876bu2GOiGMbZz9Bptqwwag90bLxQugk+TCRsw2Qy1KcrW6+TkE8ri8CwcU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F1EF4BA2E09 Received: from eig-obgw-6002b.ext.cloudfilter.net ([10.0.30.203]) by cmsmtp with ESMTPS id w28DvTY15CxrGw3ysvzdGr; Fri, 27 Feb 2026 19:58:34 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id w3yrvZSusPL32w3yrvJxkH; Fri, 27 Feb 2026 19:58:33 +0000 X-Authority-Analysis: v=2.4 cv=MqhS63ae c=1 sm=1 tr=0 ts=69a1f769 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=HzLeVaNsDn8A:10 a=ItBw4LHWJt0A:10 a=C_IRinGWAAAA:8 a=nOB7H0c33ynGP9fH4fUA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=UAWn1x9JkzUPID6Eh2aKyuHcJQrQ7xUsBCcI9cLDp+c=; b=XJqv6ScF9CXlkdfrBl23cUfkZB A5eF+XWqhJw/GCpNrGq0Yua1bYiP6vYWUI5Va3TIFu+uVp7jWoHtjZTKcAim0jTv28hA0uu+yDRWv BhoDYbeL3LV8QREGX6A0M/sK4; Received: from 97-122-122-234.hlrn.qwest.net ([97.122.122.234]:45080 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vw3yq-00000002lYp-407v; Fri, 27 Feb 2026 12:58:33 -0700 From: Tom Tromey To: Paul Koning Cc: Tom Tromey , Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH] Use the "O!" format more in the Python code In-Reply-To: <283854B8-3788-43DB-991A-DEDF4CB56387@comcast.net> (Paul Koning's message of "Fri, 27 Feb 2026 14:35:01 -0500") References: <20260227164843.2275912-1-tom@tromey.com> <87qzq6t4vy.fsf@tromey.com> <283854B8-3788-43DB-991A-DEDF4CB56387@comcast.net> X-Attribution: Tom Date: Fri, 27 Feb 2026 12:58:31 -0700 Message-ID: <871pi6t0uw.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.122.234 X-Source-L: No X-Exim-ID: 1vw3yq-00000002lYp-407v X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-122-234.hlrn.qwest.net (bapiya) [97.122.122.234]:45080 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfM3iBhdn5nIcHgZY207RH0huYyoEmqbMdKG4mWq54eYzdJ9cuAODNR6VOUVMeZKIZ/sN6ofUm6m9kuVd1AL05/yZDTuZtOb3AOupYMllL3fQtgroENw9 d9EpCSCQBnEa/iJhIOmzhK4wSr9gFRbwYneuVL+RdHgYW54T3uKHpKiI+evxmAU+wZvduW5YbJ5OIxSeSL1R+plEQ3xhNF+DzkY= 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 >>>>> "Paul" == Paul Koning writes: Paul> Also, any type can be subclassed. That Paul> last point is not true for types defined in C code, unless the code Paul> allows it to happen. In general it should do so; it's very rare Paul> indeed for it to be "the right thing" for a type not to allow Paul> subclasses. In gdb we've been fairly selective with this. I looked it up and you have to set Py_TPFLAGS_BASETYPE, which we do in 13 of the classes that gdb implements. Maybe we should do this everywhere? But if we did that then wouldn't we also want to implement the 'dict' feature everywhere as well? I'm not sure there's a big advantage to it or need for it though. So maybe it's just busy-work. I've been hoping to transition the internal types to be real C++ types, like give them constructors and destructors, initializers, etc. But maybe it's not really possible with the Python lifetime model, at least when subclassing is available. Tom