forked from destan/imdb-data-parser
-
Notifications
You must be signed in to change notification settings - Fork 15
Home
destan edited this page Jan 10, 2013
·
2 revisions
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
uses the imperative, present tense: "change", not "changed" or "changes"