Enumerate is too risky - it exhausts iterators and will show changes when sets change order

This commit is contained in:
Alex Hall 2019-04-28 21:14:40 +02:00 committed by Ram Rachum
parent 56d3389500
commit fb62a57a52

View file

@ -82,14 +82,3 @@ class Indices(Keys):
result = deepcopy(self)
result._slice = item
return result
class Enumerate(Variable):
def _keys(self, main_value):
return enumerate(main_value)
def _format_key(self, key):
return '<{}>'.format(key[0])
def _get_value(self, main_value, key):
return key[1]