From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15613A04F6; Wed, 11 Dec 2019 11:58:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 480972C6A; Wed, 11 Dec 2019 11:58:38 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id AFBA51D9E for ; Wed, 11 Dec 2019 11:58:37 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0A29922223; Wed, 11 Dec 2019 05:58:36 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 11 Dec 2019 05:58:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=kT2x9oRG/h9rrfXToZbPCKa19+qd2ZD/10ZlCDBkmDk=; b=FOAxDWHysYP9 LcxOQIEFpw8uI6bDNWyfWMMFjBrjPW9fjltmqo34anANIV7NxjucNzOGJz4I1Z3J oBa7L43qwImdvWowzmSvNfyZgQSUc1r1b/7lx0NB9aAZbGE8BAlVewfEQjfi6JSu EJl8hdGSHX6HS7NSX9k9YN2JJbTiags= 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=fm1; bh=kT2x9oRG/h9rrfXToZbPCKa19+qd2ZD/10ZlCDBkm Dk=; b=hVODhgw10ZTgZlxGD6BVVSG5VIJ3/VvvsROG4kApRwxYgYfLuhGDep7m+ nXden7Dhe0RjjMmDwZ9FGXhaLWEasgHped4aR2DuZn1dJ0GEoHQiLfzhnke0uwbh ah+/wHQZ3cmKMLipuG2iBYeyAEwWydN16gGZjUDfWic5/AN38VoE9xrgFfJyfFDG zPV5yCd7Myliz2DoAvxNRwhG36LmcLUDRAytHVqrZ6loeGOOhvdKdOFZO24B1kSY E/lvHEh7bgoeVJEP5mYB9brKMPidpcaugGFFAbKYMXxbbz1SiTWDV4OR0K7cDN7X z8ZetB2dqjyldAVgt7OLvSCIuMIIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudelhedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpehphihthhhonhdrohhrghenucfkphepjeejrddufeegrddvtdefrddukeeg necurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvg htnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id ACE5480069; Wed, 11 Dec 2019 05:58:34 -0500 (EST) From: Thomas Monjalon To: Robin Jarry Cc: dev@dpdk.org, Bruce Richardson , John McNamara , Marko Kovacevic Date: Wed, 11 Dec 2019 11:58:33 +0100 Message-ID: <1888325.zmKG1gms2k@xps> In-Reply-To: <20191210133329.53mejxbyz4m5v7gr@6wind.com> References: <20191209210000.906000-1-thomas@monjalon.net> <3025741.7YuKWOzX4Z@xps> <20191210133329.53mejxbyz4m5v7gr@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] doc: fix build with python 3.8 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 10/12/2019 14:33, Robin Jarry: > 2019-12-10, Thomas Monjalon: > > 10/12/2019 13:00, Bruce Richardson: > > > On Mon, Dec 09, 2019 at 10:00:00PM +0100, Thomas Monjalon wrote: > > > > After upgrading to python-3.8.0, a syntax mismatch is revealed: > > > > > > > > doc/guides/conf.py:240: SyntaxWarning: "is not" with a literal. > > > > Did you mean "!="? > > > > if value is not '': > > > > > > > > Replacing "is not" with "!=" seems the right thing to do. > > > > > > > > > > Since this is basically just checking for an empty string is > > > "len(value) > 0" not more logical than either comparison against ''? > > > > Probably yes. > > I don't know what is the best practice in Python. Robin, any clue? > > In most cases, it is shorter and cleaner to simply do: > > if value: > > which behind the scenes calls value.__bool__() (or value.__len__()). > > https://docs.python.org/3/reference/datamodel.html#object.__bool__ I guess it works also with python 2? I am sending a v2 with this syntax, thanks.