Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp558703pxb; Fri, 28 Jan 2022 05:20:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyePM1RJvcIQZowH1JXUv/r2j+jo3IuqocGc8AksbYcKTXw5cNCudhBIPJKuIcBCgPk497D X-Received: by 2002:a17:903:2311:: with SMTP id d17mr8406300plh.39.1643376005917; Fri, 28 Jan 2022 05:20:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643376005; cv=none; d=google.com; s=arc-20160816; b=TxoMUCPB37EYBDsRWKPhPnRJ5iCoDTeU+ugofiajle0fjckFc2EVMnBLoLKjLKbSDG 9nYs805hT+8rwRR1yAj1HuYUDPZUjnCqqhqDxxFSUqxPJBimanAMFCSfjACkGHjAF03t P9K04aoYt5cN5NXf/B+Xz6Z9AVCo2pd+MQU28gRBXma5Y9YNq3ejBaCgOvIqyhZ5jNmP QX8Jb3ojZnZQ8O4gMkhODNhhqFW4P12NFcFIt4C9H4+3G6ihx7b61uizMti++zgpdeQf 0EOOu99UQLJX65QtAncWzxVezKVO0LPS37gh02AJUIZIVtSC0R27pRPVTm3Smc5map4y Q5KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=D/WdrZt8APh+ImWs99heS/EAAslbj9KjZjoo2pBS7+c=; b=derpId6Jtk39Y1jeTVK5F45IaIIhvfvjBwFOAEzB9RfrL758KQ4XvguD8p3TWOZe4k pd39TONTxMejSvCWsqCYrKxPrYi04LWC6KXR5N6F5v6fR2wu4Zo/aur9BQu5hcRaJFYT +rX70APuL5NA1akIfSLwlwIp8uGS5yL3HSwz7Uwy5qo1TIaBX0AFdbAWp0p+JlX6zxC8 4Pf9ejFSAoYrrJrA0TJDEXsUzJ5Edc356bdsLNfUY27K1HnosvB7hBM1faAPyhIz6b5U W3SOrFTkjDu33NhyzDmYgrY1JQ2FBWl99sHI20hKjWJUzbpnfvX1oNQ3qcVi55zw3gwf RWBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nFqidDLi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si2420114pjq.61.2022.01.28.05.19.54; Fri, 28 Jan 2022 05:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=nFqidDLi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239191AbiA0R7L (ORCPT + 99 others); Thu, 27 Jan 2022 12:59:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244692AbiA0R6k (ORCPT ); Thu, 27 Jan 2022 12:58:40 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087D6C061751 for ; Thu, 27 Jan 2022 09:58:40 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id j23so4732778edp.5 for ; Thu, 27 Jan 2022 09:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D/WdrZt8APh+ImWs99heS/EAAslbj9KjZjoo2pBS7+c=; b=nFqidDLirWb5QmaEXBGreq9mA37G4EJ+Q2mpt9YciaCWN6z4xxhNtfYmkrxNHnaKLw OfEPBT0Xe0aXMGF9gnFX5fjFu/J4kr/Lf/pS+GlUlyM3xqTmw7ZYGmZT317MbXPPRQY+ qPKCe9aXzTB3+Vqr98iv5i84h3v7XET37JW7wJtXNBgn47IcCqZpy9I6mrkDnLcWEuS2 YT243GZrkCIBNdDUPyBjinEjmofSalSBeg6IIOZT43hnaxwNWKfUXfTgopMgEpG/DUiQ LnKVOY8QCobVPQN3ZJB5ATSLAYaMWJje/ltYhTTDai/TNx6UimZ1mw7fYow0lC8poKzv OTTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D/WdrZt8APh+ImWs99heS/EAAslbj9KjZjoo2pBS7+c=; b=2/kF5hfX23qlMDwDHjA2xPi15hCOIYUYat5XHHPtGCE4hMas1ibCWUttB38c0YLLKp jUQXWonVYKUZYe7AET3tP1La3GlEyc6XkSy6vqLWzkFqEth7mdq8wemsG79rT+m73ov+ xDDyuA1CCMLSFEqeuPwhnKU6YypnyP9r29/nek8one9pbDXqgR/L8bWr5LlbjVqYR2md PQpih0Da2uAsJEL9aPe+qGZOVzWXr8mpNGO93eHwDTE8oKmHH54XiE4CMPHCUn5CD7bS iEjLCvXNAxci2PkKBXd4NAeBMem3eIDwFSYa/RtuDi+YquQCT9r2/CZP0TDBvy6LBflD 24rw== X-Gm-Message-State: AOAM532u0PqxDb9PsYVYyWVAtPu7zu6ujEpPlDiB7zq21yj8WEnWMzZ+ 3QcYNqiZOrPVm5m8hSbCn2R2sOZsPj/iHMlEPM9il0AfHuE= X-Received: by 2002:aa7:c312:: with SMTP id l18mr4729705edq.334.1643306318361; Thu, 27 Jan 2022 09:58:38 -0800 (PST) MIME-Version: 1.0 References: <20220118190922.1557074-1-dlatypov@google.com> In-Reply-To: From: Daniel Latypov Date: Thu, 27 Jan 2022 09:58:27 -0800 Message-ID: Subject: Re: [PATCH 1/5] kunit: tool: drop mostly unused KunitResult.result field To: David Gow Cc: Brendan Higgins , Linux Kernel Mailing List , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Shuah Khan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 6:20 PM David Gow wrote: > > On Thu, Jan 27, 2022 at 3:55 AM 'Daniel Latypov' via KUnit Development > wrote: > > > > On Thu, Jan 20, 2022 at 9:19 AM Daniel Latypov wrote: > > > > That being said, I can live with the current solution, but'd ideally > > > > like a comment or something to make the return value Tuple a bit more > > > > obvious. > > > > > > A comment to explain that Tuple == multiple return values from a func? > > > Or something else? > > > > Friendly ping. > > Do we want a comment like this? > > > > # Note: Python uses tuples internally for multiple return values > > def foo() -> Tuple[int, int] > > return 0, 1 > > > > Whoops -- forgot to send my response to this. > > I was less worried about explaining the concept of multiple return > values, and more about naming what the return values were: that the > first one is the result information, and the second is the parsed > test. > > That being said, it's reasonably obvious from the types in this case, > so I'm okay leaving this as-is, though in general I'm wary of tuples > when the order doesn't matter, and a struct-style thing (with named > members) fits that better. Ack. Yeah, in this case I don't think creating a new type to name each value is worth it. From what I've seen of python codebases, this info is usually captured in docstrings, but yeah, this particular case seems straightforward enough that it doesn't need it. > > I'm no Python expert though, so don't let my whinging get too much in the way. > > -- David