>> - JPython sequences support three argument slices. i.e. >> range(3)[::-1] == [2,1,0]. >> CPython should be fixed. >> >> Is this actually true? Should (and will cpython) change in this >> respect? > >Well, there's a patch I wrote on sf to add this to CPython, but it was >too late for 2.0 and it got postponed. > >Does J[P]ython allow > >l = range(10) >l[::3] = range(4) > >? That's one of the odder bits of the behaviour of my patch. No: Jython 2.0 pre-alpha on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> l = range(10) >>> l[::3] = range(4) Traceback (innermost last): File "<console>", line 1, in ? ValueError: step size must be 1 for setting list slice regards, finn
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4