E&S CVS Commit: PyProtocols - Replaced 'dispatch.SimpleGeneric(doc)' with 'dispatch.on(argname)'
pje at eby-sarna.com
pje at eby-sarna.com
Tue Nov 9 23:28:00 EST 2004
Module Name: PyProtocols
Committed By: pje
Date: Wed Nov 10 04:27:31 UTC 2004
Modified Files:
PyProtocols/src/dispatch: functions.py
PyProtocols/src/protocols/tests: test_dispatch.py
Log Message:
Replaced 'dispatch.SimpleGeneric(doc)' with 'dispatch.on(argname)'
decorator. You can now dispatch on any positional argument, even nested
tuple arguments and use default values, keywords, varargs, etc. (Only
for single-dispatch functions as yet.) However, you can no longer use
'dispatch.defmethod()' or 'dispatch.when()' with single-dispatch functions.
You must use the generic function's 'when()' or 'addMethod()' attributes
to define methods for it.
To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/functions.py.diff?r1=1.6&r2=1.7
http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/test_dispatch.py.diff?r1=1.16&r2=1.17
To generate a diff of this commit:
cvs rdiff -r1.6 -r1.7 PyProtocols/src/dispatch/functions.py
cvs rdiff -r1.16 -r1.17 PyProtocols/src/protocols/tests/test_dispatch.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
More information about the source-changes
mailing list