[Zope3-Users] small bug in z3c.multiform package

Lorenzo Gil Sanchez lgs at sicem.biz
Mon Jul 17 03:46:29 EDT 2006


Hi,

I found a bug in FilterMapping class of the z3c.multiform package. 
Basically the problem is due to the way the __len__ method is computed.

Attached is a tiny patch for this bug. Feel free to use any copyright 
ownership you want for it.

Regards

Lorenzo
-------------- next part --------------
Index: multiform/gridform.py
===================================================================
--- multiform/gridform.py	(revisión: 69125)
+++ multiform/gridform.py	(copia de trabajo)
@@ -129,7 +129,7 @@
 
     def __len__(self):
         '''See interface `IReadContainer`'''
-        return len(self.keys())
+        return len(tuple(self.keys()))
 
     def __contains__(self, key):
         '''See interface `IReadContainer`'''


More information about the Zope3-users mailing list