You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
destan edited this page Jan 10, 2013
·
2 revisions
Comments in Python Classes
We shall adopt following comment style
def area(base, height): # Header
'''
(number, number) -> number # Type Contract
Return the area of a triange with dimensions base # Description
and height.
>>> area(10, 5) # Examples
25.0
>>> area(2.5, 3)
3.75
'''
return base * height / 2 # Body
Git commit messages
uses the imperative, present tense: "change", not "changed" or "changes"