MCPcopy Create free account
hub / github.com/ActiveState/code / enumerate

Function enumerate

recipes/Python/56036_Pure_Python_strptime/recipe-56036.py:60–69  ·  view source on GitHub ↗

Python 2.1-compatible enumerate function.

(iterable)

Source from the content-addressed store, hash-verified

58 return sets_dict
59
60def enumerate(iterable):
61 """Python 2.1-compatible enumerate function.
62
63 """
64 enum_list = []
65 count = 0
66 for item in iterable:
67 enum_list.append((count, item))
68 count += 1
69 return enum_list
70
71# ----- END Code to replace Python 2.3 functionality -----
72

Callers 15

strptimeFunction · 0.70
obtain_privilegesFunction · 0.50
_pprintMethod · 0.50
updateFunction · 0.50
mainFunction · 0.50
recipe-576956.pyFile · 0.50
insertMethod · 0.50
updateMethod · 0.50
extendMethod · 0.50
testFunction · 0.50
recipe-577943.pyFile · 0.50
writedepsFunction · 0.50

Calls 1

appendMethod · 0.45

Tested by 6

test_for_dayFunction · 0.40
test_appendMethod · 0.40
test_append_popMethod · 0.40
test_lenMethod · 0.40
test_treeFunction · 0.40
test_completion_statsFunction · 0.40