Created
June 9, 2013 11:19
-
-
Save ZoeyYoung/5743220 to your computer and use it in GitHub Desktop.
Python: 类注释模板,取自Google Python Style Guide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = 0 | |
def public_method(self): | |
"""Performs operation blah.""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment