On 30 aug 2005, at 17:40, Antoine Pitrou wrote:
>> Neat!
>> +1 on regexps as an argument to partition().
>
> It sounds better to have a separate function and call it re.partition,
> doesn't it ?
> By the way, re.partition() is *really* useful compared to re.split()
> because with the latter you don't which string precisely matched the
> pattern (it isn't an issue with str.split() since matching is exact).

Nice, too.
BUT, "spam! and eggs".partition(re.compile("!.*d"))
more closely resembles "xyz".split(), and that is the way things have 
evolved up-to now.

--eric

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to