[Zope-Checkins] SVN: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py pep8 clean-up of `LazyMap`
Andreas Zeidler
az at zitc.de
Wed Dec 15 05:08:50 EST 2010
Log message for revision 118924:
pep8 clean-up of `LazyMap`
Changed:
U Zope/branches/2.12/src/Products/ZCatalog/Lazy.py
-=-
Modified: Zope/branches/2.12/src/Products/ZCatalog/Lazy.py
===================================================================
--- Zope/branches/2.12/src/Products/ZCatalog/Lazy.py 2010-12-15 09:59:42 UTC (rev 118923)
+++ Zope/branches/2.12/src/Products/ZCatalog/Lazy.py 2010-12-15 10:08:49 UTC (rev 118924)
@@ -133,14 +133,16 @@
# 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])
More information about the Zope-Checkins
mailing list