mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
has, a counterpart to be.
This commit is contained in:
parent
bb0aa6f4cc
commit
22ddd5cb92
@ -392,6 +392,13 @@ def be(i):
|
||||
else:
|
||||
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):
|
||||
"""Uses the decorate-sort-undecorate pattern to sort L by function f."""
|
||||
for (i, elt) in enumerate(L):
|
||||
|
Loading…
Reference in New Issue
Block a user