[Checkins] SVN: zope.generic/trunk/src/zope/generic/ fix bug
Dominik Huber
dominik.huber at perse.ch
Wed Apr 26 10:53:03 EDT 2006
Log message for revision 67620:
fix bug
Changed:
U zope.generic/trunk/src/zope/generic/configuration/helper.py
U zope.generic/trunk/src/zope/generic/type/README.txt
-=-
Modified: zope.generic/trunk/src/zope/generic/configuration/helper.py
===================================================================
--- zope.generic/trunk/src/zope/generic/configuration/helper.py 2006-04-26 14:49:50 UTC (rev 67619)
+++ zope.generic/trunk/src/zope/generic/configuration/helper.py 2006-04-26 14:53:02 UTC (rev 67620)
@@ -162,20 +162,18 @@
...
AttributeError: Duplicated arguments: a.
- G: Sometimes no arguments are allowed. This use case is indicated by a None key interface:
+ G: Sometimes any parameters are allowed. This use case is indicated by a None key interface:
>>> parameterToConfiguration(None) is None
True
>>> parameterToConfiguration(None, 'not allowed parameter')
- Traceback (most recent call last):
- ...
- AttributeError: No arguments allowed.
+
"""
# no arguments declared
if __keyface__ is None:
- if pos or kws:
- raise AttributeError('No arguments allowed.')
+# if pos or kws:
+# raise AttributeError('No arguments allowed.')
return None
Modified: zope.generic/trunk/src/zope/generic/type/README.txt
===================================================================
--- zope.generic/trunk/src/zope/generic/type/README.txt 2006-04-26 14:49:50 UTC (rev 67619)
+++ zope.generic/trunk/src/zope/generic/type/README.txt 2006-04-26 14:53:02 UTC (rev 67620)
@@ -150,12 +150,12 @@
We can provide a specific intializer handler:
>>> def barInitializer(context, *pos, **kws):
- ... print 'Initializing ...'
+ ... print 'Initializing bar'
Additionaly we can add other operation base object event handlers:
>>> def objectEventHandler(context, event):
- ... print 'Guguseli from object event.'
+ ... print 'Guguseli from object event.'
After all we register our component using the type directive:
@@ -198,8 +198,9 @@
...
TypeError: __init__ requires 'other' of 'IOtherConfiguration'.
- >>> bar = api.createObject(IBarMarker, other=u'Specific initialization data.')
- Initializing ...
+ >>> bar = api.createObject(IBarMarker, other=u'Specific initialization data.')
+ Guguseli from object event.
+ Initializing bar
This registration attached the specific configuration to the type information.
You can retrieve type information by a typed instance or the marker type itself
More information about the Checkins
mailing list