[Zope3-checkins] CVS: Zope3/src/zope/interface - type.py:1.3
Steve Alexander
steve@cat-box.net
Mon, 30 Dec 2002 09:00:49 -0500
Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv23593/src/zope/interface
Modified Files:
type.py
Log Message:
Removed confusing double-negatives.
=== Zope3/src/zope/interface/type.py 1.2 => 1.3 ===
--- Zope3/src/zope/interface/type.py:1.2 Wed Dec 25 09:13:42 2002
+++ Zope3/src/zope/interface/type.py Mon Dec 30 09:00:48 2002
@@ -44,10 +44,11 @@
self._reg = {}
def register(self, interface, object):
- if interface is not None and not IInterface.isImplementedBy(interface):
+ if interface is None or IInterface.isImplementedBy(interface):
+ self._reg[interface] = object
+ else:
raise TypeError(
"The interface argument must be an interface (or None)")
- self._reg[interface] = object
def get(self, interface, default=None):
"""