[Patches] [ python-Patches-1491804 ] Simple slice support for list.sort() and .reverse()
SourceForge.net
noreply at sourceforge.net
Fri May 19 21:19:08 CEST 2006
Patches item #1491804, was opened at 2006-05-19 21:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1491804&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Heiko Wundram (hwundram)
Assigned to: Nobody/Anonymous (nobody)
Summary: Simple slice support for list.sort() and .reverse()
Initial Comment:
As requested per
http://groups.google.de/group/comp.lang.python/browse_thread/thread/6feadf8170900e53/aa621eed0fe14050?hl=de#aa621eed0fe14050
list.sort() should support extra keyword arguments
start and stop, which specify a slice of the whole list
to sort inplace.
The attached patch implements this functionality, and
extends the sorted() builtin to also offer these
keyword arguments, and additionally implements slice
support (also with start, stop) for list.reverse().
The patch updates the list object methods and the
sorted builtin, and also updates the testsuite to check
for the new keyword arguments and updates the
documentation to list them.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1491804&group_id=5470
More information about the Patches
mailing list