E&S CVS Commit: pylib - YAGR.2 - Yet Another Great Refactoring, Part 2: Docs & Interfaces

pje at eby-sarna.com pje at eby-sarna.com
Mon May 28 22:49:00 EDT 2001


Module Name:	pylib
Committed By:	pje
Date:		Tue May 29 02:48:01 UTC 2001

Modified Files:
	pylib/TW: Aspects.py

Log Message:
YAGR.2 - Yet Another Great Refactoring, Part 2: Docs & Interfaces

Refactored aspect objects as potentially any object which implements
AspectInterface.  This allows us to create specialized aspect metaclasses
which perform "interesting" operations on the contents of their
dictionaries.  Also, it makes for easier documentation and implementation.

Implemented a new builder-replacement protocol, per discussion w/Ty.  The
process now looks like:

* Get a default builder for the thing to be layered

* If we already had a builder for this name, ask the new builder for what
  to replace them both with.

* If the builder was such that it needs to be passed in the object the
  builder was derived for, then we pass it in for overlaying

Now it is possible for builders to chain atop one another, transform the
finished output of a previous builder, etc.

Added detailed documentation to the interfaces.  Not done yet, but it's
a lot better, especially in terminology and concept.  The hacky smell is
beginning to fade, at least from the core AOP module.  It is getting long,
though (almost 900 lines already).  A reorganization is probably called
for once the documenting/reviewing is done.  There are, however, some
distinct advantages to keeping it usable as a single module; it becomes
a more likely candidate for inclusion in the Python standard library,
for example.  Also, people can try it out as a standalone AOP/GP module
without having to swallow TransWarp whole.


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

To generate a diff of this commit:
cvs rdiff -r1.9 -r1.10 pylib/TW/Aspects.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