E&S CVS Commit: pylib - Made recipes self-flattening, so that Recipe(Recipe(X,Y),Recipe(Z)) ==

pje at eby-sarna.com pje at eby-sarna.com
Sat Jun 9 10:16:00 EDT 2001


Module Name:	pylib
Committed By:	pje
Date:		Sat Jun  9 14:15:50 UTC 2001

Modified Files:
	pylib/TW: Components.py

Log Message:
Made recipes self-flattening, so that Recipe(Recipe(X,Y),Recipe(Z)) ==
Recipe(X,Y,Z).  Thus, ingredient addition is now easily accomplished by
always returning Recipe(a,b) where a and b are the items to be added,
whether they are recipes, sequences, or specifications.  Added an
"Ingredient" base class which implements this addition, and made all specs,
builders, etc. inherit from it, so that addition is universally available.

Note, however, that strings are always interpreted by recipes as import
specifications, which can lead to unexpected results.  It may be that we
need a better way to specify delayed imports.  :(


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.11&r2=1.12

To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 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