[Python-Dev] Re: string.find() again (was Re: timsort for jython)
Duncan Booth
duncan@rcp.co.uk
Fri, 9 Aug 2002 16:26:19 +0100
On 09 Aug 2002, Andrew Koenig <ark@research.att.com> wrote:
>> Do you have a use case? Or are you just striving for consistency?
>> It would be more consistent but I'm not sure what the point is. I
>> can think of situations where '' in 'abc' would be needed, but not so
>> for 'abc'.replace('', '_').
>
> It's the first way that comes to mind of s p r e a d i n g o u t
> the characters in a string for use in, say, the title of a report.
The first way that comes to my mind is:
>>> ' '.join("spreading out")
's p r e a d i n g o u t'
--
Duncan Booth duncan@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?