Re: A proposal idea for string.split with negative maxsplit

2005-01-28 Thread Antoon Pardon
Op 2005-01-28, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> This behaviour would remain but additionally we would have the >> following. >> > "st1:st2:st3:st4:st5".split(':',-2) >> ["st1:st2:st3" , "st4" , "st5"] >> >> What do people think here? > "st1:st2:st3:st4

Re: A proposal idea for string.split with negative maxsplit

2005-01-28 Thread Fredrik Lundh
Antoon Pardon wrote: > This behaviour would remain but additionally we would have the > following. > "st1:st2:st3:st4:st5".split(':',-2) > ["st1:st2:st3" , "st4" , "st5"] > > What do people think here? >>> "st1:st2:st3:st4:st5".rsplit(':', 2) ['st1:st2:st3', 'st4', 'st5'] -- http://ma