All of lore.kernel.org
 help / color / mirror / Atom feed
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 --


WARNING: multiple messages have this Message-ID (diff)
From: Markus Heiser <markus.heiser@darmarit.de>
To: Changbin Du <changbin.du@gmail.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-usb@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	linux-doc@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-fpga@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-mm@kvack.org,
	linux-crypto@vger.kernel.org, linux-kselftest@vger.kernel.org,
	intel-gfx@lists.freedesktop.org
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 --

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Markus Heiser <markus.heiser@darmarit.de>
To: Changbin Du <changbin.du@gmail.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-usb@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	linux-doc@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-fpga@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-mm@kvack.org,
	linux-crypto@vger.kernel.org, linux-kselftest@vger.kernel.org,
	intel-gfx@lists.freedesktop.org
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)
Message-ID: <20191029054246.fUkum8iSItPE2IGyOz-Z2kkVtgqAE7RNfhNY85jBw38@z> (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 --

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Markus Heiser <markus.heiser@darmarit.de>
To: Changbin Du <changbin.du@gmail.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-usb@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	linux-doc@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-fpga@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-mm@kvack.org,
	linux-crypto@vger.kernel.org, linux-kselftest@vger.kernel.org,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [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)
Message-ID: <20191029054246.rGi2gvncaS9XuewZa7Ff5v7pIAV7rbSyxPHlKNpPDZM@z> (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 --

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-29  5:53 UTC|newest]

Thread overview: 32+ 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-20 18:05 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-10-20 18:35 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-20 20:14 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-10-24 18:19 ` [PATCH v2] " Jonathan Corbet
2019-10-24 18:19   ` [Intel-gfx] " Jonathan Corbet
2019-10-24 18:19   ` Jonathan Corbet
2019-10-25  6:57   ` Jani Nikula
2019-10-25  6:57     ` [Intel-gfx] " Jani Nikula
2019-10-25  6:57     ` Jani Nikula
2019-10-25 14:48     ` Changbin Du
2019-10-25 14:48       ` [Intel-gfx] " Changbin Du
2019-10-25 14:48       ` Changbin Du
2019-10-28  9:24       ` Jani Nikula
2019-10-28  9:24         ` [Intel-gfx] " Jani Nikula
2019-10-28  9:24         ` Jani Nikula
2019-10-28  9:24         ` Jani Nikula
2019-10-28  9:24         ` Jani Nikula
2019-10-29  0:31         ` Changbin Du
2019-10-29  0:31           ` [Intel-gfx] " Changbin Du
2019-10-29  0:31           ` Changbin Du
2019-10-29  5:42           ` Markus Heiser [this message]
2019-10-29  5:42             ` [Intel-gfx] " Markus Heiser
2019-10-29  5:42             ` Markus Heiser
2019-10-29  5:42             ` Markus Heiser
2019-10-29  8:00           ` Jonathan Corbet
2019-10-29  8:00             ` [Intel-gfx] " Jonathan Corbet
2019-10-29  8:00             ` Jonathan Corbet
2019-10-29  8:00             ` Jonathan Corbet
2019-10-31 13:50             ` Changbin Du
2019-10-31 13:50               ` [Intel-gfx] " Changbin Du
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.