[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/zope/component/components.py
Added missing repr and some backward compatibility attributes.
Jim Fulton
jim at zope.com
Wed Mar 1 00:09:10 EST 2006
Log message for revision 65654:
Added missing repr and some backward compatibility attributes.
Changed:
U Zope3/branches/jim-adapter/src/zope/component/components.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/component/components.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/components.py 2006-03-01 05:09:04 UTC (rev 65653)
+++ Zope3/branches/jim-adapter/src/zope/component/components.py 2006-03-01 05:09:09 UTC (rev 65654)
@@ -379,4 +379,17 @@
(self.required, self.name, self.handler, self.info
) = required, name, handler, doc
+ @property
+ def factory(self):
+ return self.handler
+
+ provided = None
+
+ def __repr__(self):
+ return '%s(%r, %r, %r, %r)' % (
+ self.__class__.__name__,
+ tuple([r.__name__ for r in self.required]),
+ self.name,
+ getattr(self.factory, '__name__', self.factory), self.info,
+ )
More information about the Zope3-Checkins
mailing list