PEP 285: Adding a bool type
John Roth
johnroth at ameritech.net
Sun Mar 31 07:41:05 EST 2002
More information about the Python-list mailing list
Sun Mar 31 07:41:05 EST 2002
- Previous message (by thread): PEP 285: Adding a bool type
- Next message (by thread): PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Martin v. Loewis" <martin at v.loewis.de> wrote in message news:m3663dnisp.fsf at mira.informatik.hu-berlin.de... > "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. Good point. In that case, the result still isn't logically a boolean - it's at least "True", "False" or "Huh?" John Roth > > Regards, > Martin >
- Previous message (by thread): PEP 285: Adding a bool type
- Next message (by thread): PEP 285: Adding a bool type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list