feature request: a better str.endswith

Duncan Booth duncan at NOSPAMrcp.co.uk
Tue Jul 22 04:34:13 EDT 2003


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.


-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list