added -d option to generate to make docstrings