1
什麼是標準的方式來記錄的函數參數和類的類型屬性那些有望成爲一個類的實例和這些區分被預期爲類對象他們自己?類VS類的實例Python文檔樣式對象
class TestClass(object):
def __init__(self):
pass
class Objectify(object):
def __init__(self):
pass
class NeatDocumentation(object):
"""A class demonstrating neat documentation style.
Attributes:
cls (TestClass?): A class you want to test.
obj (Objectify?): An instance of `Objectify` class.
string (str): A string because why not.
"""
def __init__(self, cls_, obj, string):
self.cls = cls_ # An instance can be created by executing self.cls()
self.obj = obj
self.string = string