Yeah, just yesterday I asked myself the same question in sphinx --- I
assume it's a sphinx problem.
Ondrej
Sphinx does this by introspection so it needs to come up with some
order on the methods. If you want something done based on the order
they are in the file, then you need to do something like inspecting
the func_code object. Since Cython objects don't have these, you need
to do something else with the line info. Also, you need to figure out
what to do if you include methods from superclasses (which we don't,
but is possible with the autodoc extension). It's probably doable, but
no one has done it.
Also, there are probably lots of modules and classes where an
alphabetical listing is way better than the one they are in in the
code since the alphabetical is at least consistent and predictable.
--Mike
I think that alphabetical is probably the simplest option. This
suggests that module level documentation needs to give the overview/
organization that Robert wants. Carl Witty is the master of such
organization.
Nick
Note that in sphinx you can set the order by hand yourself by the
:members: field like this:
.. autoclass:: Theora
:members: get_frame_image, read_frame
I just checked that.
Ondrej
Often related functions are grouped together in the file, and I would
like this to be preserved (if possible). Alphabetical is fine for an
index, but otherwise information is lost. For example, for
ell_rational_field, all the hegner point methods are grouped, all the
p-adic l-function methods are grouped, all the methods dealing with
sha are grouped, etc.
- Robert
It seems to me that the only thing we can do is parse the file a
little and generate the
lines Ondrej lists above.
-- William