0
我正在使用Eclipse + PyDev中的Python。當我通過「Module:CLI(argparse)」模板創建新模塊時,Eclipse在文件的開頭創建了以下注釋塊。什麼是此結構化評論以及什麼是「更新」字段?
#!/usr/local/bin/python2.7
# encoding: utf-8
'''
packagename.newfile -- shortdesc
packagename.newfile is a description
It defines classes_and_methods
@author: user_name
@copyright: 2015 organization_name. All rights reserved.
@license: license
@contact: user_email
@deffield updated: Updated
'''
它似乎有某種結構,我猜它是由某種東西解析的?我有幾個問題:
- 這種類型的評論結構是如何調用的以及它使用了什麼程序?
- 如何在
@license
下包含多行apache許可證2.0通知? - 什麼是
updated
字段?
我不會說「最」的文檔是這種格式。我一直在編程Python多年,從來沒有使用它,幾乎從來沒有在圖書館遇到它。 – 2015-02-17 22:31:56
這是非常真實的。我想我應該寫「大多數文檔(以這種形式)都遵循Epydoc標準」 – 2015-02-17 22:32:57