Commit 3bd76737 authored by Andreas Zeidler's avatar Andreas Zeidler

pep8 clean-up of `LazyMap`

parent be45dbd3
...@@ -133,14 +133,16 @@ class LazyMap(Lazy): ...@@ -133,14 +133,16 @@ class LazyMap(Lazy):
# Don't access data until necessary # Don't access data until necessary
def __init__(self, func, seq, length=None): def __init__(self, func, seq, length=None):
self._seq=seq self._seq = seq
self._data={} self._data = {}
self._func=func self._func = func
if length is not None: self._len=length if length is not None:
else: self._len = len(seq) self._len = length
else:
self._len = len(seq)
def __getitem__(self,index): def __getitem__(self, index):
data=self._data data = self._data
if index in data: if index in data:
return data[index] return data[index]
value = data[index] = self._func(self._seq[index]) value = data[index] = self._func(self._seq[index])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment