classification
Title: split() method
Type: behavior Stage:
Components: Windows Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: QuantumTim, terry.scott
Priority: normal Keywords:

Created on 2008-10-13 22:01 by terry.scott, last changed 2008-10-13 22:29 by terry.scott. This issue is now closed.

Messages (4)
msg74701 - (view) Author: Terry Scott (terry.scott) Date: 2008-10-13 22:01
x = "Four score  and seven"
x.split() => ["Four", "score", "and", "seven"] 
x.split(" ") => ["Four", "score", " ", "and", "seven"] 

Probably not a big deal but it seems that it should be consistent. One
of my students spotted it.
msg74703 - (view) Author: Tim Gordon (QuantumTim) Date: 2008-10-13 22:17
This is the intended behaviour.  See 
http://www.python.org/doc/2.5.2/lib/string-methods.html for details.
msg74706 - (view) Author: Terry Scott (terry.scott) Date: 2008-10-13 22:28
Tim,

Duh, thanks sorry I didn't check the documentation. Thanks.

Terry

On Mon, 13 Oct 2008, Tim Gordon wrote:

>
> Tim Gordon <tim.py@aleph17.co.uk> added the comment:
>
> This is the intended behaviour.  See
> http://www.python.org/doc/2.5.2/lib/string-methods.html for details.
>
> ----------
> nosy: +QuantumTim
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4115>
> _______________________________________
>
msg74707 - (view) Author: Terry Scott (terry.scott) Date: 2008-10-13 22:29
Benjamin,

Thanks. The documentation cleared this up for me. Thanks.

Terry

On Mon, 13 Oct 2008, Benjamin Peterson wrote:

>
> Changes by Benjamin Peterson <musiccomposition@gmail.com>:
>
>
> ----------
> resolution:  -> invalid
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4115>
> _______________________________________
>
History
Date User Action Args
2008-10-13 22:29:28terry.scottsetmessages: + msg74707
2008-10-13 22:28:56terry.scottsetmessages: + msg74706
2008-10-13 22:21:05benjamin.petersonsetstatus: open -> closed
resolution: not a bug
2008-10-13 22:17:04QuantumTimsetnosy: + QuantumTim
messages: + msg74703
2008-10-13 22:01:30terry.scottcreate