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.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 8FC0A1F44D for ; Mon, 15 Apr 2024 15:25:09 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=e4GfxFjf; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rwOCP-0003Wx-V8; Mon, 15 Apr 2024 11:24:49 -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 1rwOCO-0003Wo-P4 for bug-gnulib@gnu.org; Mon, 15 Apr 2024 11:24:48 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rwOCN-0007ix-6P for bug-gnulib@gnu.org; Mon, 15 Apr 2024 11:24:48 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6eaf9565e6bso2015386b3a.2 for ; Mon, 15 Apr 2024 08:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713194685; x=1713799485; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=nscGTL3PtbyqW1XD6npxBDkFMRhuWzwDduFmxG7ZiGs=; b=e4GfxFjfK18JKY0M+LKb2SE1z5zA9qJ9Adh41kRQhdLJhaRcgUv6CoAA2I9XN2//PW BCeqCZA4Gb0nkxjVoBX12Vpud5CR6RGqh6kR7VGYhTZ3Z4815/rNirkZkUhW5PpCslby PCGUpGwb6arOLvjuYDG5VcI1s0cwOeFTWHt3RcTIADr8N12781fTo76XV+ldD9xViDRw mdQG9TkAJPHBcOjrC9qlABC5ITxZcA9oTd36BsU63RWd0tZAg/pOXQV1o2lPgj28/7Y1 3gU0neH/OLlU3stOMmuHV5YLutPKHsO6WYgN6+dSvaQxCIu/2KxBqkyP44DaNlH1kEfi JM/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713194685; x=1713799485; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nscGTL3PtbyqW1XD6npxBDkFMRhuWzwDduFmxG7ZiGs=; b=cHIwYm+uQrcmBDnH0EGOP91M0gn3TTp+Dv5x6IoMGSPSgxsvsjh4ZV0za1EyGonhAM LYCBKDq9/tZy0ZXYqLOO97N/ywmVddT1RftC8LxrxF3GnlgFqqeJdkJz6OEuVRXX+pvz 7ZxS00ZXAW2iB7941jmUKiAP32ZCPil4ijzir04J9CLQSHf9dEDAMUoiU+cNWm3qlnB7 OPSCbXhJVW6R3GaYT56hp937Riqb6+xwqcQGAN32parxU06RODKgTnR6xBSV+pKDvnEh KQAc91t4qzuXWrxEGTRenKcsoHsP8IZPYZ+qc39kxiDPjq1xvsVmbKYvok8AyStrgNPY vNCw== X-Forwarded-Encrypted: i=1; AJvYcCXs1oOb/OkHq1TD2FBEuh04nKR+jfIzi/lQqIZG6+K/hYOv8SyuKNa7AKUc03hx9qEotA5fuGAQXvqCTGiWeCs15HE= X-Gm-Message-State: AOJu0Yw03Ajt/jH4JAxmlcWJpdd30JhjoK1tmtMmsDD4RuDAEaqweuRB dygZmSCu0KKZxKRIcIxdGJDhHoOg0dp4M1Zq2DbYGSwU6++dmLiB X-Google-Smtp-Source: AGHT+IH3U4jNgaO/gJoOCagIAHA+64So5bA//crIRPHOSpPAGdrQ6NaGoHHYQIgF/1gAk/HzTrJEXw== X-Received: by 2002:a05:6a00:815:b0:6ea:b395:ca67 with SMTP id m21-20020a056a00081500b006eab395ca67mr9807846pfk.29.1713194683969; Mon, 15 Apr 2024 08:24:43 -0700 (PDT) Received: from [192.168.1.5] (c-73-189-213-139.hsd1.ca.comcast.net. [73.189.213.139]) by smtp.gmail.com with ESMTPSA id j21-20020a056a00175500b006eaafcb0ba4sm7344956pfc.185.2024.04.15.08.24.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Apr 2024 08:24:43 -0700 (PDT) Message-ID: <77cae641-4960-48ea-adf5-6ef28edb658d@gmail.com> Date: Mon, 15 Apr 2024 08:24:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: gnulib-tool.py: Remove a redundant function. To: Bruno Haible , bug-gnulib@gnu.org References: <1b2f9946-96fb-40ea-bd9f-0466bc87456b@gmail.com> <6735697.07rScijWmr@nimes> Content-Language: en-US From: Collin Funk In-Reply-To: <6735697.07rScijWmr@nimes> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=collin.funk1@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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 Bruno, On 4/15/24 7:58 AM, Bruno Haible wrote: > Patch 0002 is not applicable because it relies on 0001, which was not good. Yes, I need to rewrite it. 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. > 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: list1 = [ 1, 2, 3, 4 ] list2 = [ 5, 6, 7, 8 ] result = list(zip(list1, list2)) print(result) [(1, 5), (2, 6), (3, 7), (4, 8)] This still uses 'zip' but maybe you find it easier to read? result = [ (a, b) for a, b in zip(list1, list2) ] > 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. Ah, yes that makes sense. I'll go fix that now. Collin