[Python-Dev] partition() (was: Remove str.find in 3.0?)

Eric Nieuwland eric.nieuwland at xs4all.nl
Thu Sep 1 19:37:27 CEST 2005

Raymond Hettinger wrote:
>> I think it's convenient but also rather odd that split() with a static
>> string argument was moved from module string to a method in class str,
>> while split() with a regexp has remained in module re.
> I don't see what you find odd.  With str and unicode objects being
> builtin, you don't need a separate module.  In contrast, re is a
> stand-alone extension which, of course, requires an import.

That's an implementation oriented view.
IMHO it is all a match-and-cut operation with fixed strings the 
simplest form of match expressions.
 From that point of view the distinction between the two is quite 
Of course, when turning from principles to daily practice again it is 
quite clear the distinction is useful.


More information about the Python-Dev mailing list