E&S CVS Commit: PyProtocols - Constrain evaluation order of multi-dispatch tests to conform to expression

pje at eby-sarna.com pje at eby-sarna.com
Sun Nov 7 19:27:00 EST 2004


Module Name:	PyProtocols
Committed By:	pje
Date:		Mon Nov  8 00:26:19 UTC 2004

Modified Files:
	PyProtocols/src/dispatch: __init__.py functions.py interfaces.py
	    strategy.py
	PyProtocols/src/protocols/tests: test_dispatch.py

Log Message:
Constrain evaluation order of multi-dispatch tests to conform to expression
order, so that e.g. 'when("y<>0 and x/y<15")' can't end up with a
ZeroDivision error.  This only affects tests where a total ordering can
be obtained (i.e. no dependency cycles), and even then only the tests that
involve some computation on an argument.  (I.e. 'y<>0 and x<>0' does not
impose an ordering on the two tests, but 'y<>0 and x.foo<>0' will not
check 'x.foo' unless 'y<>0' has already been checked.)


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/__init__.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/interfaces.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/functions.py.diff?r1=1.5&r2=1.6
http://cvs.eby-sarna.com/PyProtocols/src/dispatch/strategy.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/test_dispatch.py.diff?r1=1.15&r2=1.16

To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 PyProtocols/src/dispatch/__init__.py \
    PyProtocols/src/dispatch/interfaces.py
cvs rdiff -r1.5 -r1.6 PyProtocols/src/dispatch/functions.py
cvs rdiff -r1.3 -r1.4 PyProtocols/src/dispatch/strategy.py
cvs rdiff -r1.15 -r1.16 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