Raymond Hettinger <[EMAIL PROTECTED]> wrote: > They include [...] the str.partition function,
Where is the current version of this patch? After reharsing the archives, I have an additional suggestion which I didn't find already mentioned in the discussion. What about: str.partition() -> (left, right or None) str.rparition() -> (left or None, right) which means: "foo:bar".partition(":") -> ("foo", "bar") "foo:bar".rpartition(":") -> ("foo", "bar") "foo:".partition(":") -> ("foo", "") "foo:".rpartition(":") -> ("foo", "") ":foo".partition(":") -> ("", "foo") ":foo".rpartition(":") -> ("", "foo") "foo".partition(":") -> ("foo", None) "foo".rpartition(":") -> (None, "foo") Notice that None-checking can be done as a way to know if the separator was found. I mentally went through the diff here (http://mail.python.org/pipermail/python-dev/2005-August/055781.html) and found out that most (all?) the usages of '_' disappears with this semantic. -- Giovanni Bajo _______________________________________________ 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