Message505
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']
>>>
|
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:16:58 | admin | link | issue490157 messages |
| 2008-02-20 17:16:58 | admin | create | |
|