has, a counterpart to be.

This commit is contained in:
Jeremy Fincher 2004-08-11 17:10:20 +00:00
parent bb0aa6f4cc
commit 22ddd5cb92

View File

@ -392,6 +392,13 @@ def be(i):
else: else:
return 'are' return 'are'
def has(i):
"""Returns the form of the verb 'to have' based on the number i."""
if i == 1:
return 'has'
else:
return 'have'
def sortBy(f, L): def sortBy(f, L):
"""Uses the decorate-sort-undecorate pattern to sort L by function f.""" """Uses the decorate-sort-undecorate pattern to sort L by function f."""
for (i, elt) in enumerate(L): for (i, elt) in enumerate(L):