E&S CVS Commit: pylib - Added support for treating recipes as specifications. This allows you to

pje at eby-sarna.com pje at eby-sarna.com
Fri Jun 8 10:31:00 EDT 2001


Module Name:	pylib
Committed By:	pje
Date:		Fri Jun  8 14:30:56 UTC 2001

Modified Files:
	pylib/TW: Components.py

Log Message:
Added support for treating recipes as specifications.  This allows you to
do things like::

    Template(
        foo = Template1 + Template2
        bar = T3 + T4
    ) + Template(
        foo = tQux + tSpam
        bar = wazoo
    )

and have it actually work.  The nested recipes (created by adding templates
together) will have the same effect as though they were added singly at the
top level of recipe.  This keeps you from having to do ugly things like::

    Template(
        foo = Template1
        bar = T3
    ) + Template(
        foo = Template2
        bar = T4
    ) + Template(
        foo = tQux
        bar = wazoo
    ) + Template(
        foo = tSpam
    )

which, while performing the same function, is ugly and hard to
refactor and/or reuse.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/pylib/TW/Components.py.diff?r1=1.5&r2=1.6

To generate a diff of this commit:
cvs rdiff -r1.5 -r1.6 pylib/TW/Components.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