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 175411F44D for ; Mon, 15 Apr 2024 14:59:08 +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=AH0qVqCo; 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=mMU+RlPj; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwNnM-0005dq-5Z; Mon, 15 Apr 2024 10:58:56 -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 1rwNnL-0005di-75 for bug-gnulib@gnu.org; Mon, 15 Apr 2024 10:58:55 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rwNnF-0003Jm-E9 for bug-gnulib@gnu.org; Mon, 15 Apr 2024 10:58:54 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1713193126; cv=none; d=strato.com; s=strato-dkim-0002; b=PoQY6oDkykCdSX2yCPE1btoTet+QMAkJGTegaKjaiV6E2GFG+kEGb2hX8DOFTnj+jd GgEneeHkZDFTKLAIPxzwZHoxos9p5jck9ZS4VaOPjng5IUjKJ8dZ/sUfx+9Ul9KJUF6j lsPdtR35b0Ktlz2gu5UOc2wEfMU+6Ib7va1+5daZBNHEOj+W4LL0oTVjDwsPZKoPbWGy BSdtqQ3epVHPCaz/uOzv+a7Vc09sFZ+RrdSG7ZrLyWjDbH1Q/X0jvZ7IAN/mWBj75Psg 1EBvMOwJBiD12XPazVVokDMpu6e8y5HJEHSeQnvu9pXriHywvL7tawS9hLDkn3Tyr3eM p1QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1713193126; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=8KUz7O1wVJ90ZnYP9CoMXakc7BPYBIUkkiYmBvoqFow=; b=Jh5Fd67hdCRXwzatOLBPUxl0sFV5Z15wVI8oV3iKSpk3pqcq+/vw7lZs3SXryjvjjF Ql2RM+rttcV1xwJEV6vyydPUjq2T5PESmT2gO3uqc8yltAzfeEP3bSGfWOBxFmhTnNtC ElW8AZGzgO1EZ61BqY2KQ6tjn/uxwhCIBctDto/gdU/X/U07z8CIyf982Yy5qGvxIMvv 8fw86ascbKLV3gRtp+TfxtDVBDv0aXu+frHiCHw/wGEWfLxuHk9xD1lrpH3AP4P+ewiJ WUngYbU8jyfNrnUG50ycyenk7hHCxHZCcflIcLdd883khza5cVH3L55GamLcAOAr35ts qdsg== 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=1713193126; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=8KUz7O1wVJ90ZnYP9CoMXakc7BPYBIUkkiYmBvoqFow=; b=AH0qVqCo+NnTWPvbTy27J76nPqDBGVI7NpzEtDfwLfdjRMEaVuVm+W3ePXUkAW+M00 4mq71aKC2h7MVFeszqdnz+fw6d1gR3layVirHyKyQdgeatW9+u9e4U4Ti4mCSYtGM9Ta JR9aOQrXwpakSyaLAzWukDW5wdpBMAqgm1CZnle6O4M7XWAbvls33cdej1x6wQyA6u7y KKzSmL7sPhqX+2d5FZQwayBZ1MPwZpEVA4/hvGyrGHazLZEjFOAs/2EGMD7AmFMEo7B2 Dtsj7PzByt9aLhe/pjt1PeazY6JuD+gMMFGJZjuQMjpbamv251QdH+bQMxBHeA857GjP LvAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1713193125; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=8KUz7O1wVJ90ZnYP9CoMXakc7BPYBIUkkiYmBvoqFow=; b=mMU+RlPj7Pfu0CxRv8atw4PV338nqstR8mIw9b6HskcZIpy8nZK2BW7JyKSKIzHwme vlHgTsB5Uzt0i8Ua2cDw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOV1PKcgbrVmq52JS43gXfHCV+KMw==" Received: from nimes.localnet by smtp.strato.de (RZmta 50.3.2 AUTH) with ESMTPSA id N8610003FEwjm1J (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 15 Apr 2024 16:58:45 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Cc: Collin Funk Subject: Re: gnulib-tool.py: Remove a redundant function. Date: Mon, 15 Apr 2024 16:58:45 +0200 Message-ID: <6735697.07rScijWmr@nimes> In-Reply-To: <1b2f9946-96fb-40ea-bd9f-0466bc87456b@gmail.com> References: <1b2f9946-96fb-40ea-bd9f-0466bc87456b@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.24; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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, > Patch 0002 does this. GLTestDir also has this rewrite_files() function > so I did the same there. Maybe it is worth making that a helper > function or using a base class in the future. > > Also, the set() and list() calls around zip(...) are important since > zip() returns an iterator [1]. I've used whichever was most similar to > the previous code. Patch 0002 is not applicable because it relies on 0001, which was not good. Also, the last hunk makes use of yet another Python built-in function 'zip', where list comprehension [ ... for ... in ... ] is more readable. > Patch 0003 removes a directories list that was unused. These are > created in the loop below it as files are written. In gnulib-tool.sh the directories are created ahead of the loop that copies the files. Why? Because when we have to create 500 files in the lib/ directory, it is faster to do 'if not isdir(dirname)' once than 500 times. This is also true in Python. Bruno