Should NoneType be iterable?
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jun 20 11:01:00 EDT 2023
On 20/06/23 7:36 pm, Barry wrote:
> I have some APIs that do return None or a list.
> The None says that a list is not available and that the caller is
> responsible with dealing in a application-domain specific with
> with that situation.
In that case, the caller should probably be checking for
None rather than blindly trying to iterate over the result.
--
Greg
More information about the Python-list
mailing list