Annotation specification:
2.1. File Header:
#!/usr/bin/env python# -*- coding: utf-8 -*-# @Author : Jason# @Mail : [email protected]# @File : 文件名.py
2.2. Class Notes:
class SampleClass(object):"""Summary of class here.Longer class information....Longer class information....Attributes: likes_spam: A boolean indicating if we like SPAM or not. eggs: An integer count of the eggs we have laid."""def __init__(self, likes_spam=False): """Inits SampleClass with blah.""" self.likes_spam = likes_spam self.eggs = 0def public_method(self): """Performs operation blah."""
The Chinese readme is as follows:
""" 类的终结...(主要介绍功能概况)详细描述。。。属性: 参数1:类型,干啥用的 参数:类型,干什么用的"""
2.3. Function Notes:
def fetch_bigtable_rows (big_table, Keys, Other_silly_variable=none): "" "fetches rows from a bigtable.retrieves rows Pertaining to the given keys from the Table instancerepresented by Big_table. Silly things may happen ifother_silly_variable are not None.Args:big_table:An open Bigtable table instance. Keys:a sequence of strings representing the key of each table row to fetch. Other_silly_variable:another optional variable, that have a much longer name than the other args, and which does no Thing. Returns:a dict mapping keys to the corresponding table row data fetched. Each row is represented as a tuple of strings. For example: {' Serak ': (' Rigel VII ', ' preparer '), ' Zim ': (' Irk ', ' Invader '), ' lrrr ': (' Omicron Persei 8 ', ' E Mperor ')} If a key from the keys argument are missing from the dictionary and then so row was not found in the TABLE.R Aises:IOError:An error occurred accessing the bigtable. Table object. "" " Pass
The Chinese readme is as follows:
"""函数整体功能概述详细描述。。。参数: 参数1:干啥用的 参数2:干啥用的返回: 详细描述。。。 例子: {“参数1,参数2。。。”:返回值)}提示: 程序不完善的或者可能出现报错的情况"""