docstring

    20熱度

    3回答

    有沒有類似於文檔字符串描述模塊或函數來描述模塊數據的方法? class MyClass(object): def my_function(): """This docstring works!""" return True my_list = [] """This docstring does not work!"""

    8熱度

    1回答

    在VIM中編寫Python時,有什麼方法可以查看函數的文檔字符串嗎? 例如: def MyFunction(spam): """A function that foobars the spam returns eggs""" return foobar(spam).eggs() 我希望能夠輸入MyFunction(spam0)看doc字符串,無論是作爲一個工具提

    24熱度

    7回答

    什麼,在你看來是一個有意義的文檔字符串?你期望在那裏描述什麼? 例如,考慮這個Python類的__init__: def __init__(self, name, value, displayName=None, matchingRule="strict"): """ name - field name value - field value display