Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp913483ybb; Fri, 20 Mar 2020 10:07:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuWki2+TzGYGaBEqs0jSS7ZsXvNDhw+tteRQyw+oKLmQViUnxUwXlctb7fLtt9e8Fon+bjs X-Received: by 2002:aca:c4c5:: with SMTP id u188mr7104500oif.139.1584724035713; Fri, 20 Mar 2020 10:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584724035; cv=none; d=google.com; s=arc-20160816; b=GaWY2iSkL19Z+kQ9Is3oWvGY0Bk7Jc6cc/nihEbHvGKBNzz9haWDAH7ImA2qRqBGgx AF4LzLkaBvKiR+KDHtDkK6nzcEddul9dwW67JtXxFOjPzA74OmbmB0BXaJuXgV0pMwuI YzHg9IS0cGb5kS8NwZDW3nZfX4uudT1ex8f2EKkmyptCKLvXSmYlhiZPLbtIqa6Bm7z/ lDLf9K3YcgeqL8AN7xg23eMuVKZXez97ye8fxHqyFhf/n+fFOwyd4nE0wr0Df9VwKSnA xQg4EoerY5XuReneupFCv87loDAbGFU5QO6k0VWMfLsTFzF3aydF9Ks6yU4ai3iFbyn5 yEcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature:dkim-signature; bh=amfe8YKfDyEVVeIYxRxirnjNRunqadNgHmLYG0QZs8I=; b=YFWS3zeiBYrM7Roys/6Kv0XgH4EmUrgDo1EewrFjnv0YMX2YtSfvKnEzkCdWSBmzp6 882wMSZrD7QPydXfuGeD0HM5VMGWiU+r9bVLeu2Nvb8523/5b3huJUadHMSLMX4zKVFB Uva+QN/Hf8mBkJZUvF3v0AXzIBHj54Kp+WDoo9gG10tHvGKALdjovxdR5jWIcp0PZM2U ZtVbmnQXUFMlrdzIcc4ZHxz1N8j0vvzY19jXdS0xkx4/S4WtkKdV2+siGayPeyYMnY0g C3x6fS8lWEPDGARv+pDZZKQ0Rdn83Ewwj364Xi+kkTXsTtOz36hkjVEJsYACjiitc2cG 5Cyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bernat.ch header.s=fm2 header.b=JaSJ2a1S; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=SolwAbVW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bernat.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m23si3714393ots.325.2020.03.20.10.06.54; Fri, 20 Mar 2020 10:07:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bernat.ch header.s=fm2 header.b=JaSJ2a1S; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=SolwAbVW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bernat.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbgCTRF4 (ORCPT + 99 others); Fri, 20 Mar 2020 13:05:56 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:34833 "EHLO wout3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbgCTRF4 (ORCPT ); Fri, 20 Mar 2020 13:05:56 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 38314641; Fri, 20 Mar 2020 13:05:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 20 Mar 2020 13:05:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bernat.ch; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm2; bh= amfe8YKfDyEVVeIYxRxirnjNRunqadNgHmLYG0QZs8I=; b=JaSJ2a1Sj92pLJ+l y+GlM9GoggZQvguJgG89FEGKaKWkVYAdC1DaomM7iT1ypG2ANZ1opY6zKLYnpuGE wlHRGVBlMA25JsQIn9/1+T1xMWyq2QV/XQFSpCDFPBmiUhL0aCQknayuyrjfM3e7 LlkCsaOAMvVVNqAQz8jPCvHNm1U+xS2Oxj853XN6imKH8QX43Yp5YpWDjbrWnHWj o2z4elZmU2fHz4h67QqXmpKVtbFdKL7pVq89KJQHoUm8/7BD1Q/5lF20NwnYpzwy 2N/5+FtozHqGS9jk4yizF9sXzc+ntLyhu31lqGrWnthI+Y08N7S41lDGXtrQM5yx ggEORA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=amfe8YKfDyEVVeIYxRxirnjNRunqadNgHmLYG0QZs 8I=; b=SolwAbVWKyo3/q+nYh8nk1f+klb3XqlF9mF9U1HNmxsFdM6S0NsrKK1/w wCYCaBI/nOJlX5o+xr13OzfAtzHrZZj04lFGfLmvCPTc/trrcNVe8nu3eoC9qivW bGVWM3Jj6q/2v6xv+9PzazmI5U2SiXimICNYaQaUtr6FaVmKAI6cUOahWeh4PgaH Qq8E3WaJ9K6ZOKrdpdrMzeAZ+6Mm8TW6NaKv0GeY/qbYaz5QXlCGjvbEafLdiSMG fEvWoUM7t049gWFk++EdHYz56iFc9rbKscxbcLhfRD9i+MU/uhm+pw4KxoeKBqKA qrQSCLsaKnr4xMRAHWU41UtaooMfQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeguddgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomhepgghinhgt vghnthcuuegvrhhnrghtuceovhhinhgtvghnthessggvrhhnrghtrdgthheqnecukfhppe ekvddruddvgedrvddvfedrkeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepvhhinhgtvghnthessggvrhhnrghtrdgthh X-ME-Proxy: Received: from neo.luffy.cx (lfbn-idf1-1-140-83.w82-124.abo.wanadoo.fr [82.124.223.83]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C8043280063; Fri, 20 Mar 2020 13:05:54 -0400 (EDT) Received: by neo.luffy.cx (Postfix, from userid 500) id E59C4A91; Fri, 20 Mar 2020 18:05:52 +0100 (CET) From: Vincent Bernat To: Kieran Bingham Cc: Jan Kiszka , Stephen Boyd , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scripts/gdb: replace "is 0" by "== 0" References: <20200320163820.3634106-1-vincent@bernat.ch> <55dae299-a5a0-6e11-c966-1d8dcb46c452@kernel.org> Date: Fri, 20 Mar 2020 18:05:52 +0100 In-Reply-To: <55dae299-a5a0-6e11-c966-1d8dcb46c452@kernel.org> (Kieran Bingham's message of "Fri, 20 Mar 2020 16:47:19 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ❦ 20 mars 2020 16:47 +00, Kieran Bingham: > Oh, I thought python encouraged the 'is' style. Usually, only for "None", "False" or "True" (but for the latest, this doesn't usually make sense). > Given the nature of the statement, would > > if not node: > return None > > be any more appropriate ? It would be more consistent with the other uses (like the while below and the ifs even further). However, I don't fully understand this code (notably the "node = node.address.cast(...)" where node is not defined yet and node is replaced by the value of "root['rb_node']" just after), so can't say for sure node cannot be equal to something eveluating to False in some conditions. -- Writing is easy; all you do is sit staring at the blank sheet of paper until drops of blood form on your forehead. -- Gene Fowler