changeset 941:417787b9b9a7 trunk

Fix genshi.core.Attrs.__contains__ so that it returns False instead of None if an attribute is not found (CPython translates this to False automatically but PyPy does not).
author hodgestar
date Sun, 03 Jul 2011 18:59:47 +0000
parents f15334b65cf8
children 2eb4b394709c
files genshi/core.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/core.py
+++ b/genshi/core.py
@@ -354,6 +354,7 @@
         for attr, _ in self:
             if attr == name:
                 return True
+        return False
 
     def __getitem__(self, i):
         """Return an item or slice of the attributes list.
Copyright (C) 2012-2017 Edgewall Software