Author rhettinger
Recipients BreamoreBoy, collinwinter, hwundram, rhettinger, terry.reedy
Date 2010-08-12.09:53:31
SpamBayes Score 1.45234e-05
Marked as misclassified No
Message-id <1281606814.56.0.352287462968.issue1491804@psf.upfronthosting.co.za>
In-reply-to
Content
I'm rejecting this feature request on the grounds that the use cases are sufficiently uncommon to warrant adding API complexity.  

Currently, the notions of reverse() and sort() are comparatively simple.  They correspond well to what I see in other languages.

Another issue is orthogonality, keeping the notions of slicing separate from concerns about sorting and reversing.

Also, the optimization aspect of this feature request is misguided (trying to reduce an O(n) step embedded inside an O(n log n) operation.

The purported syntactic gain is also negligible and uncompelling.
The rare bit of code that currently is written:

  sorted(s[a:b], key=f)

would instead become:

  sorted(s, key=f, start=a, stop=b)

There is no significant syntactic win or gain in expressiveness.
History
Date User Action Args
2010-08-12 09:53:34rhettingersetrecipients: + rhettinger, collinwinter, terry.reedy, hwundram, BreamoreBoy
2010-08-12 09:53:34rhettingersetmessageid: <1281606814.56.0.352287462968.issue1491804@psf.upfronthosting.co.za>
2010-08-12 09:53:33rhettingerlinkissue1491804 messages
2010-08-12 09:53:31rhettingercreate