Jon*_*age 6 python intellisense doxygen pvts
我一直在使用 PyTools for Visual Studio 2013,并且想知道是否可以以智能感知和 DOxygen 都能理解的方式记录参数。
例如,我一直在尝试这样(摘自PEP257的片段):
def complex(real=0.0, imag=0.0):
"""Form a complex number.
Keyword arguments:
real -- the real part (default 0.0)
imag -- the imaginary part (default 0.0)
"""
print("Test func running")
if __name__ == '__main__':
complex(
Run Code Online (Sandbox Code Playgroud)
...但智能感知似乎没有接受参数描述:
小智 -1
我无法与 Intellisense 对话,但我已将 doxygen 与 Python 一起使用。您可以像以前一样使用文档字符串,但它不会选择 doxygen 的符号来解析文档的各个部分。如果你需要的话,你会想做这样的事情:
##
# @brief Form a complex number.
#
# Keyword arguments:
# @param real -- the real part (default 0.0)
# @param imag -- the imaginary part (default 0.0)
def complex(real=0.0, imag=0.0):
print("Test func running")
if __name__ == '__main__':
complex(
Run Code Online (Sandbox Code Playgroud)
这里有一些描述http://www.doxygen.nl/manual/docblocks.html 靠近页面底部。
不过,我建议使用为 Python 制作的 IDE,例如 PyCharm,而不是 Visual Studio。它将为您提供许多 VS 没有的面向 Python 的工具,包括 Python 的智能感知类型功能。
| 归档时间: |
|
| 查看次数: |
2209 次 |
| 最近记录: |