In Sphinx, is there a way to document parameters along with declaring them?

前端 未结 3 1702
礼貌的吻别
礼貌的吻别 2021-02-20 09:43

I prefer to document each parameter (as needed) on the same line where I declare the parameter in order to apply D.R.Y.

If I have code like this:

def foo         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-02-20 10:01

    Annotations are meant to partly address this problem in Python 3:

    http://www.python.org/dev/peps/pep-3107/

    I'm not sure if there has been any work in applying these to Sphinx yet.

提交回复
热议问题