Why, why, why... listreverse() (like listsort()) expects its
arguments to be in the format by which all built-in methods are
called: 'self' guaranteed to be a list object and 'args' the Python
argument list. sortlist() (note reversed name) is intended to be
called from C, checks its 'self' argument and diesn't have a second
argument. It's trivial to write a C-callable wrapper for
listreverse() -- it's just bot been done because I never thought
anybody would want this functionality from C.
> Is there any other way to access the reverse function from within a C
> module that I'm overlooking?
I suppose that you could do it using the call_method() function I
proposed in a previous mail.
--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>