From: Markus Heiser <markus.heiser@darmarit.de>
To: Changbin Du <changbin.du@gmail.com>,
Jani Nikula <jani.nikula@linux.intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-crypto@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-wireless@vger.kernel.org, linux-fpga@vger.kernel.org,
linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org,
Matthew Wilcox <willy@infradead.org>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'
Date: Tue, 29 Oct 2019 06:42:46 +0100 [thread overview]
Message-ID: <36c4dcfb-5425-b4bc-a5e9-4fd1458c8385@darmarit.de> (raw)
In-Reply-To: <20191029003120.llve32crfw63ovpw@mail.google.com>
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 --
next prev parent reply other threads:[~2019-10-29 5:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-20 13:17 [PATCH v2] kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers' Changbin Du
2019-10-24 18:19 ` Jonathan Corbet
2019-10-25 6:57 ` Jani Nikula
2019-10-25 14:48 ` Changbin Du
2019-10-28 9:24 ` Jani Nikula
2019-10-29 0:31 ` Changbin Du
2019-10-29 5:42 ` Markus Heiser [this message]
2019-10-29 8:00 ` Jonathan Corbet
2019-10-31 13:50 ` Changbin Du
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36c4dcfb-5425-b4bc-a5e9-4fd1458c8385@darmarit.de \
--to=markus.heiser@darmarit.de \
--cc=changbin.du@gmail.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=tzimmermann@suse.de \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).