django/django — pull request #59 by bradbeattie (2012-05-11 21:23:09+00:00)
Title: This change matches Django's slice filter to be consistent with extended slice syntax.

Before:

slice_filter(['a','b','c'], "::2") == ['a','b','c'][::2]
slice_filter(['a','b','c'], ":2") == ['a','b','c'][:2]
slice_filter(['a','b','c'], "2") != ['a','b','c'][2]

After:

slice_filter(['a','b','c'], "::2") == ['a','b','c'][::2]
slice_filter(['a','b','c'], ":2") == ['a','b','c'][:2]
slice_filter(['a','b','c'], "2") == ['a','b','c'][2]

A consequence of this change is that existing templates that make use of foobar|slice:int will no longer produce the same result, though I'd argue that the above change is closer in line with what people might expect.