From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ZGYRNWzHnmXL0DcAWB0awg (envelope-from ) for ; Wed, 10 Jan 2024 11:35:56 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=CoU7xnbg; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CE2891E0C2; Wed, 10 Jan 2024 11:35:56 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 A11CF1E098 for ; Wed, 10 Jan 2024 11:35:54 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33D963857C52 for ; Wed, 10 Jan 2024 16:35:54 +0000 (GMT) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id EC2EB3858D38 for ; Wed, 10 Jan 2024 16:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC2EB3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EC2EB3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704904537; cv=none; b=prmCT3g13QpveyciCnfnI3PPAeIn1axXsYvKB79dUpFkZyyrWxilica2awGnA8KkXWNBLCFDOaNLEX/+KWS5CNvVceP+teEQCAXZxy2ef0to1scJzx+y0iGZjuf60GHhpI/uSfx5CYMizyn6hSCsmgab+zcbv2Ecd9Ac+S72J9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704904537; c=relaxed/simple; bh=ytgBGDPpMZsAVe6wLGcHkCg5BkTnDXH3AL0W9UOk65g=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=P6YFr6T3uYOvUyHply0vVl1mOrg420ZKWe6T3R87UxaUi195ig6S9adbVTTltuQWjquI/wBLbhj/tSU7LnYcNr4NsTQVjquu93OkUGT4HeNWPiVUun4fktM86jqzy3Cz0T/rSG/tNu9o/uPqcNB988Q11MQGO8JYstZJJWgGONA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNbYF-0004qo-FQ; Wed, 10 Jan 2024 11:35:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BVtAKqmrhjadaAVGiFwWyCtefrDEWZ4f6fYZrH0ZKEI=; b=CoU7xnbgYhgu BJTM1zJckeUT7G6Gv580ouUlFgmWFzW/fub/mMeqK2KtVFwyUJW6ZSpnqVJoMW9Z7m4ADoMSqfVKW fCO06PdQceni9K/ud+022bhy3FgZicoDPNkaepJXstaICrEHwwRNpUeRE4WpV0QjJ07CvhXB9U9tb VKSy2cotmmAqJEKDQaviaX3aWvJyuC5QKBEeohv2TzN7JBXTgY9vaDvnnrqF9CWbADl9X6K0H9rSL GvCB+SVgas9oGXk3QKD+zIOSG0vU/rr0n5B0NpgcrAfMa4CrDvfNMEq7RK3z68DIK00A9u810xmU9 5sWiowNv5NWFO9Ur251FoA==; Date: Wed, 10 Jan 2024 18:35:16 +0200 Message-Id: <83r0ipm9iz.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: (message from Andrew Burgess on Wed, 10 Jan 2024 15:54:44 +0000) Subject: Re: [PATCHv2 7/8] gdb/doc: add some notes on selecting suitable attribute names References: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 > From: Andrew Burgess > Cc: Andrew Burgess > Date: Wed, 10 Jan 2024 15:54:44 +0000 > > In previous commits I've added Object.__dict__ support to gdb.Inferior > and gdb.InferiorThread, this is similar to the existing support for > gdb.Objfile and gdb.Progspace. > > This commit extends the documentation to offer the user some guidance > on selecting good names for their custom attributes so they > can (hopefully) avoid conflicting with any future attributes that GDB > might add. > > The rules I've proposed are: > > 1. Don't start user attributes with a lower case letter, all the > current GDB attributes start with a lower case letter, and I suspect > all future attributes would also start with a lower case letter, and > > 2. Don't start user attributes with a double underscore, this risks > conflicting with Python built in attributes (e.g. __dict__) - though > clearly the user would need to start and end with a double > underscore, but it seemed easier just to say no double underscores. > > I'm doing this as a separate commit as I've updated the docs for the > existing gdb.Objfile and gdb.Progspace so they all reference a single > paragraph on selecting attribute names. > --- > gdb/doc/python.texi | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) Thanks. > +See @ref{choosing attribute names} for guidance on selecting a Why not @xref? And please add a comma after the right brace, there are still old versions of Texinfo that insist on that. > +See @ref{choosing attribute names} for guidance on selecting a > +suitable name for new attributes. Likewise. > +See @ref{choosing attribute names} for guidance on selecting a > +suitable name for new attributes. And likewise. Reviewed-By: Eli Zaretskii