[New-bugs-announce] [issue11162] Add tuple/list sep to string split method

Tshepang Lekhonkhobe report at bugs.python.org
Wed Feb 9 20:46:23 CET 2011


New submission from Tshepang Lekhonkhobe <tshepang at gmail.com>:

I was hoping that I could use a list/tuple of separators for the split method:

    "abcde".split(["b", "d"])

vs.

    import re
    re.split("b|d", "abcde")

That's one extra LOC, and (worse still) forces me to learn regexp.

Does this suggested 'improvement' make sense?

----------
components: Library (Lib)
messages: 128234
nosy: tshepang
priority: normal
severity: normal
status: open
title: Add tuple/list sep to string split method

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11162>
_______________________________________


More information about the New-bugs-announce mailing list