On Fri, Jan 7, 2022 at 8:47 AM <[email protected]> wrote: > > On 2022-01-06 at 14:21:48 -0700, > Mats Wichmann <[email protected]> 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
