From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 52102385841D for ; Tue, 25 Apr 2023 16:02:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52102385841D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682438577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G8TgLHFSQs8aN/JM6Runru1dOmYyoeVhPXCswPCX9p8=; b=h5oAxU5y8wUIHJ32RHUfSw5T31eapVR/V6bjdcIoP3144aladxnAbP6Ti83NLeW6Y7P3pS L1gWYzMoDVUVSkLa6KPSaoBrk0NFSmHGxiTsxID7d9yleb7AoJCN+idmyMJrxg80xHuL1g 57yNMPMgpD0MuuR7kRMZtZybw/G7QZY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-255-LNqKOBGFOuG5Ji_q2pCc9w-1; Tue, 25 Apr 2023 12:02:54 -0400 X-MC-Unique: LNqKOBGFOuG5Ji_q2pCc9w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 91549185A78F; Tue, 25 Apr 2023 16:02:53 +0000 (UTC) Received: from [10.22.9.236] (unknown [10.22.9.236]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51BA914171B8; Tue, 25 Apr 2023 16:02:53 +0000 (UTC) Message-ID: <52e95c34-fbfc-0cf3-4a9f-ced4cbd64b2a@redhat.com> Date: Tue, 25 Apr 2023 09:02:52 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] Environment variable convenience function To: Eli Zaretskii Cc: gdb-patches@sourceware.org References: <20230423170755.1103121-1-keiths@redhat.com> <83fs8pxzqm.fsf@gnu.org> From: Keith Seitz In-Reply-To: <83fs8pxzqm.fsf@gnu.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: On 4/24/23 04:53, Eli Zaretskii wrote: >> Date: Sun, 23 Apr 2023 10:07:55 -0700 >> + ** New Python-based convenience function $_env(name[, default]), which >> + returns the string value of the environment variable of the given name. > > This part is OK. > >> +@findex $_env@r{, convenience function} >> +@item $_env(@var{name}@r{[}, @var{default}@r{]}) >> +Return the value of the environment variable named @var{name}. >> + >> +If the variable is not defined in the environment, the optional default value >> +is returned, if specified, or a Python exception is thrown. > > The last sentence abuses the passive voice, so I suggest to rephrase: > > If the variable @var{name} is not defined in the environment, the > function returns the vale of the optional argument @var{default}, > and if that was not specified, it throws a Python exception. > > Reviewed-By: Eli Zaretskii > I've updated my hack-job English -- thank you for the review/suggestions! Keith PS. I will be posting a v2 with subtle docs changes.