[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security - Checker.py:1.5

Steve Alexander steve@cat-box.net
Thu, 13 Jun 2002 04:40:17 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Security
In directory cvs.zope.org:/tmp/cvs-serv6061/lib/python/Zope/Security

Modified Files:
	Checker.py 
Log Message:
wrt last checkin: silly me. Of course iterators shouldn't be Rocks.
While type(iter(())) is the same as type(iter([])) in Python 2.2.1, there is a new listiterator type in Python 2.3.-1.
Added a checker for this type that allows access to "next".


=== Zope3/lib/python/Zope/Security/Checker.py 1.4 => 1.5 ===
     unicode: NoProxy,
     type(not 1): NoProxy, # Boolean, if available :)
-    type(iter(())): NoProxy,  # iterator, needed for Python 2.3
 }
 
 _default_checkers = {
@@ -310,7 +309,8 @@
     types.BuiltinMethodType: _callableChecker,
     type: _typeChecker,
     types.ModuleType: _moduleChecker,
-    type(iter([])): NamesChecker(['next']),
+    type(iter([])): NamesChecker(['next']), # same types in Python 2.2.1,
+    type(iter(())): NamesChecker(['next']), # different in Python 2.3
     type(Interface): _interfaceChecker,
     }