Message242245
On Wed, Apr 29, 2015, at 13:25, Sergey B Kirpichev wrote:
>
> Sergey B Kirpichev added the comment:
>
> On Wed, Apr 29, 2015 at 03:25:19PM +0000, Benjamin Peterson wrote:
> > So, basically you need a base case for recursion? What's wrong with
> > explicitly writing that out?
>
> Because it's complex (and costly). This is not a trivial test and
> I don't see reasons to fix that is not broken. And it will be difficult
> to explain for readers: remember, I need this exceptional case only in
> the world with a strange Python's convention (Python try to sort a list
> when it doesn't make sense).
>
> Mathematical algorithm is not broken - programming language is.
>
> Here is C:
> https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/msort.c;#l45
> Here is Ruby:
> https://github.com/ruby/ruby/blob/trunk/array.c#L2454
I don't understand the analogy, since neither of these two have key
functions.
>
> > It's practical if you have a broken key function and test it with a one
> > element list.
>
> It's silly to test key function on a single-element list *only*.
>
> > > BTW, why this issue was closed?
> >
> > 3 of us agreed this doesn't seem like a suitable change.
>
> And 1 seems to be ok with patch. Is this just a question of
> number of votes?
I should also clarify that Raymond and Mark and responsible for
maintaining most of the algorithmic/data structure code in Python.
>
> At least, please consider this as a documentation issue. That ...
> feature may be obvious for a Python developer, but not for
> mathematician (as well as ordinary Python user).
This is probably impossible to prove either way. |
|
Date |
User |
Action |
Args |
2015-04-29 19:40:07 | benjamin.peterson | set | recipients:
+ benjamin.peterson, tim.peters, rhettinger, paul.moore, mark.dickinson, r.david.murray, matrixise, Sergey.Kirpichev |
2015-04-29 19:40:07 | benjamin.peterson | link | issue24075 messages |
2015-04-29 19:40:07 | benjamin.peterson | create | |
|