On Fri, Jan 7, 2022 at 8:47 AM <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2022-01-06 at 14:21:48 -0700,
> Mats Wichmann <m...@wichmann.us> wrote:
>
> > And at a more meta level:  many functions in the Python world return
> > None as an indication that the operation did not succeed.  It's useful
> > because in many circumstances None is an "out of band" value - one
> > that could not happen naturally - and thus returning it provides an
> > easy way for the caller to check for success or failure.
>
> Errors should never pass silently.
>
> Unless explicitly silenced.
>
> https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/
>

Python is not C, and returning None is not the same as returning a
null pointer. Also, I dispute that null pointers are the
"billion-dollar mistake" described there, but of course, everyone
loves to talk about figures like that.

Returning None is most definitely not a flaw.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to