[Zodb-checkins] CVS: Zope3/src/zope/interface - interface.py:1.11
Jim Fulton
jim at zope.com
Tue Jun 24 16:05:13 EDT 2003
Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv24366/interface
Modified Files:
interface.py
Log Message:
Fixed a bug in interface initialization that caused declarations for
__doc__ to be lost.
=== Zope3/src/zope/interface/interface.py 1.10 => 1.11 ===
--- Zope3/src/zope/interface/interface.py:1.10 Tue Jun 3 18:46:25 2003
+++ Zope3/src/zope/interface/interface.py Tue Jun 24 15:04:40 2003
@@ -101,15 +101,16 @@
if attrs is None:
attrs = {}
- if '__doc__' in attrs:
- if __doc__ is None:
- __doc__ = attrs['__doc__']
- del attrs['__doc__']
- if __doc__ is not None:
- self.__doc__ = __doc__
- else:
- self.__doc__ = ""
+ d = attrs.get('__doc__')
+ if d is not None:
+ if not isinstance(d, Attribute):
+ if __doc__ is None:
+ __doc__ = d
+ del attrs['__doc__']
+
+ if __doc__ is None:
+ __doc__ = ''
Element.__init__(self, name, __doc__)
More information about the Zodb-checkins
mailing list