E&S CVS Commit: PEAK - Added 'peak.util.expr': tools for symbolic manipulation of Python

pje at eby-sarna.com pje at eby-sarna.com
Wed Jun 23 16:55:01 EDT 2004


Module Name:	PEAK
Committed By:	pje
Date:		Wed Jun 23 20:54:46 UTC 2004

Modified Files:
	PEAK/src/peak/util/tests: __init__.py
Added Files:
	PEAK/src/peak/util: expr.py
	PEAK/src/peak/util/tests: test_expr.py

Log Message:
Added 'peak.util.expr': tools for symbolic manipulation of Python
expressions.  This first drop provides a mechanism for creating proxy
types that invoke a builder function when expressions are executed, thus
translating things like 'something.foo[23]' into something like::

    build("[]", build(".",something,"foo"), 23 )

Assuming, of course, that 'something' is a proxy instance.  Expression
proxies can wrap the node object types of your choice, so that you can
reuse this code for various types of query or other frameworks, without
having to code all the '__foo__' methods to do this sort of thing by hand.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/util/expr.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/util/tests/__init__.py.diff?r1=1.13&r2=1.14
http://cvs.eby-sarna.com/PEAK/src/peak/util/tests/test_expr.py?rev=1.1&content-type=text/vnd.viewcvs-markup

To generate a diff of this commit:
cvs rdiff -r0 -r1.1 PEAK/src/peak/util/expr.py
cvs rdiff -r1.13 -r1.14 PEAK/src/peak/util/tests/__init__.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/util/tests/test_expr.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