我有课:
class Holiday(ActivitiesBaseClass):
"""Holiday is an activity that involves taking time off work"""
Hotel = models.CharField(max_length=255)
""" Name of hotel """
我可以输入以下内容来打印类文档字符串:
print(Holiday.__doc__)
此输出为:
Holiday is an activity that involves taking time off work
我如何打印作为Class属性/元素的Hotel的文档字符串?
print(Holiday.Hotel.__doc__)
返回:
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
我也尝试过help()函数无济于事。