feature request: a better str.endswith
Bengt Richter
bokr at oz.net
Tue Jul 22 12:27:02 EDT 2003
On Tue, 22 Jul 2003 08:34:13 +0000 (UTC), Duncan Booth <duncan at NOSPAMrcp.co.uk> wrote:
>bokr at oz.net (Bengt Richter) wrote in news:bfi4ir$t21$0 at 216.39.172.122:
>
>> I guess the full set of functions might be
>> any_true, any_false, all_true, and all_false.
>>
>> or maybe someone can think of better short phrase?
>>
>
>'all_false(...)' is simply 'not any_true(...)'
>'any_false(...)' is 'not all_true(...)'
>
>So you could get by with just two of these functions, in which case
>'any_of', and 'all_of' might be suitable names.
>
I don't think they're equivalent if they do short-circuiting.
Regards,
Bengt Richter
More information about the Python-list
mailing list