[ python-Bugs-859113 ] inconsistency in string.split()

SourceForge.net noreply at sourceforge.net
Fri Dec 12 15:35:43 EST 2003


Bugs item #859113, was opened at 2003-12-12 20:40
Message generated for change (Settings changed) made by theller
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=859113&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: damon fasching (damon3937)
Assigned to: Nobody/Anonymous (nobody)
Summary: inconsistency in string.split()

Initial Comment:
Hi,

Bug is a strong word for this.  I'll call this an inconsistency in string.
split().

Python 2.3.2 (#2, Nov 12 2003, 02:20:08) 
[GCC 3.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> blah = ''    
>>> string.split(blah)
[]
>>> string.split(blah, '\t')
['']
>>> 
>>> string.split(blah, ' ')
['']

The NULL string has the same relationship to any character as it has 
to any other, so it seems that string.split('', anything) should always 
give the same result.

Damon

----------------------------------------------------------------------

Comment By: George Yoshida (quiver)
Date: 2003-12-12 21:29

Message:
Logged In: YES 
user_id=671362

I think this is a duplicate of bugs[811604].
# [ 811604 ] "string".split behaviour for empty strings
http://www.python.org/sf/811604

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=859113&group_id=5470



More information about the Python-bugs-list mailing list