[Checkins] SVN: Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py use shorter list-comprehension
Hano Schlichting
cvs-admin at zope.org
Mon Dec 3 09:55:56 UTC 2012
Log message for revision 128482:
use shorter list-comprehension
Changed:
U Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py
-=-
Modified: Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py
===================================================================
--- Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py 2012-12-03 09:55:32 UTC (rev 128481)
+++ Products.ZCTextIndex/trunk/src/Products/ZCTextIndex/ZCTextIndex.py 2012-12-03 09:55:55 UTC (rev 128482)
@@ -192,8 +192,7 @@
all_texts.append(text)
# Check that we're sending only strings
- all_texts = filter(lambda text: isinstance(text, basestring), \
- all_texts)
+ all_texts = [t for t in all_texts if isinstance(t, basestring)]
if all_texts or self.index.length():
return self.index.index_doc(documentId, all_texts)
return res
More information about the checkins
mailing list