E&S CVS Commit: PyProtocols - Begin prep for pred. abstraction and pattern matching. 'ITest' objects

pje at eby-sarna.com pje at eby-sarna.com
Sat Jan 1 12:12:00 EST 2005

Module Name:	PyProtocols
Committed By:	pje
Date:		Sat Jan  1 17:11:34 UTC 2005

Modified Files:
	PyProtocols/src/dispatch: functions.py interfaces.py predicates.py
	PyProtocols/src/protocols/tests: test_dispatch.py test_parsing.py

Log Message:
Begin prep for pred. abstraction and pattern matching.  'ITest' objects
must now have 'appliedTo(expr)' and '__invert__()' methods.  The former
handles conversion of an expression+test to an ISignature or
IDispatchablePredicate, so that predicate abstractions and patterns can
expand into something more complex than just a single-item signature.
The '__invert__()' method is now used instead of NotTest as the normal
mechanism for inverting an ITest, so that NotTest doesn't have to know
how to invert arbitrary predicate abstractions.  There are no functional
changes in this checkin; these are simply refactorings of existing
functionality to make later additions easier.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.16 -r1.17 PyProtocols/src/dispatch/functions.py
cvs rdiff -r1.9 -r1.10 PyProtocols/src/dispatch/interfaces.py
cvs rdiff -r1.7 -r1.8 PyProtocols/src/dispatch/predicates.py
cvs rdiff -r1.8 -r1.9 PyProtocols/src/dispatch/strategy.py
cvs rdiff -r1.23 -r1.24 PyProtocols/src/protocols/tests/test_dispatch.py
cvs rdiff -r1.15 -r1.16 PyProtocols/src/protocols/tests/test_parsing.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