Adding magic methods
Enhancement reason: I tried making documentation for a project and found out the sphinx didn't show methods such as init, len.
Enhancement: After som diggin in the autodoc.py file I found out these methods aren't documented cause of this line:
if want_all and membername.startswith('_'): # ignore members whose name starts with _ by default skip = True
Basicly is hides privatemethods but also magic methods.
My hack to that is:
magic_functions = ['__str__', '__init__', '__len__', '__lt__', '__eq__', '__ne__', '__ge__', '__gt__', '__le__', '__repr__', '__iter__' ] if want_all and membername.startswith('_') and not membername in magic_functions:
Alternatively the hack could be made differently by just testing if a mether starts and ends with ''. This would be better under the assumption people don't use the magic method naming scheme on private methods.
This also solves the no constructor method documentation, and the issue http://bitbucket.org/birkenfeld/sphinx/issue/176/provide-option-to-include-private-and-special.