From: <no...@so...> - 2001-12-07 13:49:58
|
Bugs item #490157, was opened at 2001-12-07 00:13 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=490157&group_id=12867 Category: Library Group: None Status: Open Resolution: None Priority: 5 Submitted By: Gary Herron (herron) >Assigned to: Finn Bock (bckfnn) Summary: string.splitlines() - incorrectly splits Initial Comment: Create a string with newlines (and spaces) and splitline it. The result drops the first character, and splits on both newlines and spaces. Jython on Linux with suns JDK does this: Jython 2.1b1 on java1.3.1_01 (JIT: null) >>> a = 'This is a\n multiline string\n' >>> a.splitlines() ['', 'his', 'is', 'a', '', 'multiline', 'string'] >>> Whereas CPython on Linux does this: Python 2.1.1 (#1, Nov 22 2001, 12:33:37) >>> a = 'This is a\n multiline string\n' >>> a.splitlines() ['This is a', ' multiline string'] >>> ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=490157&group_id=12867 |