> On 20 Jun 2023, at 01:57, Greg Ewing via Python-list <python-list@python.org> > wrote: > > I would question the wisdom of designing an API that > can return either a sequence or None. 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 other cases I have API that returns a default list, often []. It all depends on the design needs. Barry -- https://mail.python.org/mailman/listinfo/python-list
- Should NoneType be iterable? Peter Bona via Python-list
- Re: Should NoneType be iterable? Chris Angelico via Python-list
- Re: Should NoneType be iterable? Neal Becker via Python-list
- Re: Should NoneType be iterab... dn via Python-list
- Re: Should NoneType be iterab... Igor Berger via Python-list
- Re: Should NoneType be it... Chris Angelico via Python-list
- Re: Should NoneType be iterable? Greg Ewing via Python-list
- Re: Should NoneType be iterab... Barry via Python-list
- Re: Should NoneType be it... Greg Ewing via Python-list
- Re: Should NoneType ... Cameron Simpson via Python-list
- Re: Should NoneT... Chris Angelico via Python-list
- Re: Should N... Cameron Simpson via Python-list
- Re: Should NoneType be iterab... Roel Schroeven via Python-list