From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id F1A7D1F44D for ; Tue, 16 Apr 2024 15:10:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=nOCdPdPu; dkim=fail reason="signature verification failed" header.d=clisp.org header.i=@clisp.org header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=oTvi4co2; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwkRi-0002eo-Mb; Tue, 16 Apr 2024 11:10:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwkRg-0002eW-Qq for bug-gnulib@gnu.org; Tue, 16 Apr 2024 11:10:04 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.218]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwkRe-0006RN-DA for bug-gnulib@gnu.org; Tue, 16 Apr 2024 11:10:04 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1713280198; cv=none; d=strato.com; s=strato-dkim-0002; b=jEgs8q21QnalldV+8PWRGsYUxvukZENZ4/vNpVs0b1mU9hehMtmNx9EgGNyhJJR5Hc 8dmXbwzVvskysgunAfDdywSLX3UJK+pRv1dFWAKApKKq9Lj/m1a1q6MOgvTApuY8a0sI IzGy50HdeOE+iF1APeNGPMF5EEQp3fQcXNtEY1p+M0A0XsxigTQ0hU7NXfcQzWdG2DgV GbaFnYZpl+8RM4VhzmDdT/zwZEx/Re1S3TFywgZlzcNRLD/sLVTbGVHfV5y922Be39bT Dm6JARTIlfJwI1SGgM45upQvC2yQKNmeFZ/s3Sw3KTNgr+CC56aaRcIAXpX57Uj3acpg 9/Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1713280198; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=JyaqmMsytu98XBRF0btaphH87HHN74H+80UonsYeXWo=; b=F4sxJ5mZgVd1yx0afrcEQCPJvgUS5TfqFNPi79Xeyu/Gk6rPPwMd8jC+YkgBHnbh5N cSjO4gNM/vj4tkEJQgkwCI3s6l6FO8I7bnr3UMh+bdqt0LwF1/JfC9H/nZ+AeBIShmA/ xYkUEdXUM/yI0C45TA0bg+Pc2tDJFx6py4bdrqUzYdu37FBgtU8CS/94od/+smC7bVow tEPfzh2mI3NZ5I2RdF27R6LM1HXZ4oQWF3dVFJGPBJszDcrVXboALs5bKKc/zHjrDOkD K5cQu9R34XhxN2R+xiHNGBY8cTEVyXwaLWuFVbMnvx28mzEwmDwB8GoqqOKVGBZleBkJ abAw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1713280198; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=JyaqmMsytu98XBRF0btaphH87HHN74H+80UonsYeXWo=; b=nOCdPdPuPEx3LKU6glxL7KkOA9Y+q8gP3pyzGS80SDmHLMt+3a6qEmRBEeRnrTFpHu +pYr9JcP3B5pY67HqqTBhaEpvoK+Rd48cLbqRIgegiL5hf/U8rvICLAj/Y4ECeng1IbR /lxt9BMQSo7F8KkN30H4db8uX7SOf+FYDI5HUQ4JeXZxX+IfvSPp6ihjThqOMqQ7jcQX 0pXQAAu3KsDP7/ieEQ+Lt5Gt0ziYdxeP3vNQcHsNCGGg0lZmiibbehAEU1HfgykKGv9p NmVLcJiKP4u5MP8XshCBGHPFsLc8IC9ajM8Rkw4f3V06BdbvyoTqxMYymV1XhBt9G1ZX 2GDw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1713280198; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=JyaqmMsytu98XBRF0btaphH87HHN74H+80UonsYeXWo=; b=oTvi4co2AtZrD5D7d9vd9193KoHc+9OkCflQqVyd57S1tyBO+cpLrR71pgNjsAGy+O SmG8+XGOW/KcLtc14XDw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOTjfRkGgmMW2p3jV8cP7Upg8iY" Received: from nimes.localnet by smtp.strato.de (RZmta 50.3.2 AUTH) with ESMTPSA id N8610003GF9vr8k (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 16 Apr 2024 17:09:57 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org, Collin Funk Subject: Re: gnulib-tool.py: Remove a redundant function. Date: Tue, 16 Apr 2024 17:09:57 +0200 Message-ID: <6055935.ntHmXhgcp8@nimes> In-Reply-To: <77cae641-4960-48ea-adf5-6ef28edb658d@gmail.com> References: <6735697.07rScijWmr@nimes> <77cae641-4960-48ea-adf5-6ef28edb658d@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.218; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Hi Collin, > But I think the idea of the patch is still > correct. Since it doesn't make sense to accept a list and then only > use it with one element lists. Sure. This code structure comes from the fact that in the shell implementation, the rewriting of file names is done through a 'sed' invocation, and that is equally suited to a single file name or a list of file names. > > Also, the last hunk makes use of yet another Python built-in function 'zip', > > where list comprehension [ ... for ... in ... ] is more readable. > > Maybe I am missing something, but I don't think there is a good way to > use a list comprehension here without 'zip'. Since 'zip' is used to > combine these two lists like so: I'm talking about this piece of code: filetable = [] for src in filelist: dest = self.rewrite_files([src])[-1] filetable.append(tuple([dest, src])) which can be written as filetable = [ tuple([self.rewrite_filename(src), src]) for src in filelist ] Bruno