Skip to content

Commit 2e3a3dc

Browse files
authored
Merge pull request #2 from ourstudio-se/1-mazindexing-should-prioritize-speed
Fixed
2 parents afa3e69 + ea9705d commit 2e3a3dc

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

maz/__init__.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,13 @@ def compose(*functions):
124124

125125
return functools.reduce(compose_pair, functions)
126126

127-
def indexing(lst: list, index_item, default = None):
127+
def indexing(lst: list, index_item):
128128

129129
"""
130130
Indexing function, taking a list and what to
131-
index, as such lst[index_item]. If index_item
132-
not in lst, then default is returned.
131+
index, as such lst[index_item].
133132
"""
134-
135-
try:
136-
return lst[index_item]
137-
except:
138-
return default
133+
return lst[index_item]
139134

140135
def invoke(fn, args: list = [], kwargs: dict = {}):
141136

0 commit comments

Comments
 (0)