The Samurai Principle

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Sep 12 02:08:26 CEST 2010

In message <mailman.654.1284158340.29448.python-list at>, Robert 
Kern wrote:

> On 9/10/10 5:17 PM, Lawrence D'Oliveiro wrote:
>> In message<mailman.567.1283927599.29448.python-list at>, Ian
>> Kelly wrote:
>>> And returning None on failure is dangerous, because if the programmer
>>> does not take care to handle that case, the program may attempt to
>>> regard it as actual data.
>> But None *is* actual data.
> And that is exactly the reason why the Samurai Principle says to not
> return None when the function fails to do what it intended to do.

How can the function “fail” when it returns what it is specified to return?

More information about the Python-list mailing list