What values are considered false?
Zero
zero at example.com
Sun Feb 24 22:43:03 EST 2002
In the strictest of definitions, a "function" that does not provide a
return value is a "method"
In article <3C7953CE.8D430F71 at alcyone.com>, "Erik Max Francis"
<max at alcyone.com> wrote:
> Remco Gerlich wrote:
>
>> No, he didn't. He thought the *function* should be false, not the
>> function's
>> result. An interesting idea, but possibly hard to implement (write code
>> to
>> decide if a function does nothing). Also, I haven't been able to come
>> up
>> with any situation where it would be useful yet :-)
>
> It brings up the question of where you'd draw the line, as well. Would
> it just be functions whose body is a pass? How about ones which just
> explicitly return None (which have precisely the same effect when
> called)? What about those that do something local without side effect
> and then return None or let control flow out? Same thing again, but
> you're starting to wander into unclear territory.
>
> But, as you say, the biggest problem with the idea is its total lack of
> utility :-).
>
More information about the Python-list
mailing list