mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
has, a counterpart to be.
This commit is contained in:
parent
bb0aa6f4cc
commit
22ddd5cb92
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user