Better control over member ordering
In my source code, I usually place the class members in an order that makes sense, ie. initialization stuff at the top, related methods placed next to each other, etc.
I'd like the order in the documentation to be logical as well. I am aware, that I can use :member: for this, but once I start using that, I'll have to remember to update the .rst file every time I add a new member in the python code.
Maybe one or several of the following are possible:
- autodoc_member_order supports "as_in_code"
- a new event allows the user to define the order
- a sort method on the documenter class which can be overridden by the user
Getting the line number at which a function is defined can be done as follows:
>>> import pickle, inspect >>> inspect.getsourcelines(pickle.load) 1389