Python's partition

2011-01-22 Thread Andrei Alexandrescu
Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of sep, and return a 3-tuple containing the part before the separator, the separator itself, and the

Re: Python's partition

2011-01-22 Thread so
On Sat, 22 Jan 2011 19:44:30 +0200, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of

Re: Python's partition

2011-01-22 Thread Torarin
Divide? As in dividing a pie chart. Torarin

Re: Python's partition

2011-01-22 Thread spir
On 01/22/2011 06:44 PM, Andrei Alexandrescu wrote: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of sep, and return a 3-tuple containing the part before the

Re: Python's partition

2011-01-22 Thread Christopher Nicholson-Sauls
On 01/22/11 11:44, Andrei Alexandrescu wrote: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of sep, and return a 3-tuple containing the part before

Re: Python's partition

2011-01-22 Thread Andrei Alexandrescu
On 1/22/11 3:33 PM, Christopher Nicholson-Sauls wrote: On 01/22/11 11:44, Andrei Alexandrescu wrote: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of

Re: Python's partition

2011-01-22 Thread bearophile
Andrei Alexandrescu: Would be rather trisect, but that becomes a bit too cute. trisect name is acceptable :-) Bye, bearophile

Re: Python's partition

2011-01-22 Thread foobar
Andrei Alexandrescu Wrote: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of sep, and return a 3-tuple containing the part before the separator,

Re: Python's partition

2011-01-22 Thread Tomek Sowiński
Andrei Alexandrescu napisał: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep) Split the string at the first occurrence of sep, and return a 3-tuple containing the part before the

Re: Python's partition

2011-01-22 Thread Christopher Nicholson-Sauls
On 01/22/11 15:38, Andrei Alexandrescu wrote: On 1/22/11 3:33 PM, Christopher Nicholson-Sauls wrote: On 01/22/11 11:44, Andrei Alexandrescu wrote: Looking through Python's string functions (http://docs.python.org/release/2.5.2/lib/string-methods.html) I noticed partition(): partition(sep)