PEP 285: Adding a bool type

Martin v. Loewis martin at v.loewis.de
Sun Mar 31 05:16:54 EST 2002


"John Roth" <johnroth at ameritech.net> writes:

> I make it optimistically 180 functions. Given the reasonably
> high quality of the standard library, "return None" almost
> certainly means that the function does not have a return value,
> not that the return value should be treated as False.

Notice a subtlety, though: In a high-quality library, if the
*function* has no return value, the return statement should be just
"return". I'd always assume that the function would normally return an
object, and that "return None" indicates that no object is available
in this case. A quick glance shows that this indeed seems to be the
case in the majority of the cases.

Regards,
Martin




More information about the Python-list mailing list