Negative slicing gives unexpected result

Bug #421829 reported by Jeroen T. Vermeulen
This bug report is a duplicate of:  Bug #239767: Negative Indexing on results fails. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
New
Undecided
Unassigned

Bug Description

This may be related to bug 239767: results[-1:] gives me all of results, but list(results)[-1:] gives me just the last row as I would expect.

It's been pointed out to me that I can use last(), but the -1 is just the test case I hit this with; it's actually a variable in my code.

I've worked around this by reversing the sort order myself and using the absolute value of the slice value. It's ugly though, as the change spans a module boundary.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I just filed bug 421829, but it may be a duplicate of this one. Leaving that for the Storm engineers to decide.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.