[Patches] [Patch #100998] experimental support for extended slicing on lists

noreply@sourceforge.net noreply@sourceforge.net
Wed, 18 Oct 2000 07:44:08 -0700


Patch #100998 has been updated. 

Project: 
Category: core (C code)
Status: Open
Summary: experimental support for extended slicing on lists

Follow-Ups:

Date: 2000-Jul-27 14:31
By: mwh

Comment:
this 10 minute hack adds support for "extended slicing" to lists, by which I mean things like:

>>> range(100)[23:60:12]
[23, 35, 47, 59]

todo:
find out if this is the approved approach
add support for tuples
write docs, testsuite (make test passes as is, but should be extended).
-------------------------------------------------------

Date: 2000-Jul-27 14:39
By: mwh

Comment:
c'mon michael!  at least get *some* of the boundary cases...
-------------------------------------------------------

Date: 2000-Jul-27 23:47
By: mwh

Comment:
negative indices!

for i in listvar[::-1]:
     pass

now iterates over the list backwards (rather than coredumping...)
-------------------------------------------------------

Date: 2000-Jul-29 03:36
By: mwh

Comment:
updated patch to support slice assignements, deletions
(needs testing still)
-------------------------------------------------------

Date: 2000-Jul-30 11:10
By: mwh

Comment:
bugfixes (refounting in assignment, logic in deletion) & a few tweaks.
-------------------------------------------------------

Date: 2000-Jul-30 11:41
By: mwh

Comment:
meep!  naughty Michael hadn't been running "make test" often enough.
this update fixes that.
-------------------------------------------------------

Date: 2000-Aug-15 11:53
By: tim_one

Comment:
Note that without doc and test patches too, and Real Soon, I'll have to Postpone this.  Assigned to me to remind me of that.
-------------------------------------------------------

Date: 2000-Aug-15 12:04
By: mwh

Comment:
OK, I'll get to that soon (ie. <24hours, hopefully <4).
But bear in mind I'm now going to the pub...

I may need some advice for the docs...

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

Date: 2000-Aug-16 12:30
By: mwh

Comment:
So, I missed my deadline by twenty five minutes.  Sorry :-)

This latest patch adds a fairly basic test suite, a stab at some docs, and jumps up and down on PySlice_GetIndices.

Also (wrt. stringobject.c & unicodeobject.c) it's amazing what you can break, isn't it?  Thank God for test suites...
-------------------------------------------------------

Date: 2000-Aug-16 12:30
By: mwh

Comment:
So, I missed my deadline by twenty five minutes.  Sorry :-)

This latest patch adds a fairly basic test suite, a stab at some docs, and jumps up and down on PySlice_GetIndices.

Also (wrt. stringobject.c & unicodeobject.c) it's amazing what you can break, isn't it?  Thank God for test suites...
-------------------------------------------------------

Date: 2000-Aug-31 19:10
By: gvanrossum

Comment:
Too late for the release, sorry. And Tim hates negative strides.

We'll get back to this for 2.1.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=100998&group_id=5470