Skip to content

Commit

Permalink
pep8 clean-up of LazyMap
Browse files Browse the repository at this point in the history
  • Loading branch information
witsch committed Dec 15, 2010
1 parent be45dbd commit 3bd7673
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Products/ZCatalog/Lazy.py
Expand Up @@ -133,14 +133,16 @@ class LazyMap(Lazy):
# Don't access data until necessary

def __init__(self, func, seq, length=None):
self._seq=seq
self._data={}
self._func=func
if length is not None: self._len=length
else: self._len = len(seq)
self._seq = seq
self._data = {}
self._func = func
if length is not None:
self._len = length
else:
self._len = len(seq)

def __getitem__(self,index):
data=self._data
def __getitem__(self, index):
data = self._data
if index in data:
return data[index]
value = data[index] = self._func(self._seq[index])
Expand Down

0 comments on commit 3bd7673

Please sign in to comment.