On Thu, 11 Feb 2010 16:19:42 -0600
"Edward K. Ream" <[email protected]> wrote:

> > But it also has this code:
> >
> >         if cmp: newChildren.sort(cmp,key=key)
> >         else:   newChildren.sort(key=key)
> >
> > Does it make any sense to provide both cmp and key?  It doesn't seem to 
> > work, when todo.py priority sort provides cmp.  Changing it to just 
> > newChildren.sort(cmp) restores the todo.py sort function.
> 
> I think this was done to fix a Python 3.x porting problem.  Iirc, the
> args differ on 2.x/3.x.

Hmm, looks to me as if support for cmp was dropped in 3.x, I don't think the 
code fixes that.

I think the correct solution is for .sortSiblings to also drop support for cmp, 
and the all clients (todo.py and maybe cleo.py are probably the only ones) to 
use key instead.

Do you want me to push those changes, or at least post the diff for inspection?

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to