[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36c4dcfb-5425-b4bc-a5e9-4fd1458c8385@darmarit.de>
Date: Tue, 29 Oct 2019 06:42:46 +0100
From: Markus Heiser <markus.heiser@...marit.de>
To: Changbin Du <changbin.du@...il.com>,
Jani Nikula <jani.nikula@...ux.intel.com>
Cc: Jonathan Corbet <corbet@....net>, linux-pci@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-crypto@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-fpga@...r.kernel.org, linux-usb@...r.kernel.org,
dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
Matthew Wilcox <willy@...radead.org>,
Thomas Zimmermann <tzimmermann@...e.de>
Subject: Re: [PATCH v2] kernel-doc: rename the kernel-doc directive
'functions' to 'identifiers'
Am 29.10.19 um 01:31 schrieb Changbin Du:
>> But is it, really? I agree with Jon about the distinction between None
>> and '' being confusing.
>>
> Here python is different from C. Both empty string and None are False in python.
> Note such condition is common in python.
The one is a empty string str(''), its bool('') value is False.
| >>> type(''), bool('')
| (<class 'str'>, False)
The other is a NoneType, its bool(None) value is False.
| >>> type(None), bool(None)
| (<class 'NoneType'>, False)
None often used like NULL (pointer). E.g if a function does not give an explicit
return value, the returned value is None.
| >>> def foo():
| ... pass
| ...
| >>> print(foo())
| None
-- Markus --
Powered by blists - more mailing lists