E&S CVS Commit: PyProtocols - Implement experimental 'as' function. 'as' lets you do things like:

pje at eby-sarna.com pje at eby-sarna.com
Fri Jul 16 14:03:00 EDT 2004


Module Name:	PyProtocols
Committed By:	pje
Date:		Fri Jul 16 18:02:58 UTC 2004

Modified Files:
	PyProtocols/src/protocols: advice.py dispatch.py predicates.py
	PyProtocols/src/protocols/tests: test_advice.py

Log Message:
Implement experimental 'as' function.  'as' lets you do things like:

    [as(classmethod)]
    def foo(cls, ...):
        ...

    [as(binding.Make, events.taskFactory)]
    def someTask(self, ...):
        ...

Decorators are applied right-to-left, so that the second example above
equates to 'someTask = binding.Make(events.taskFactory(someTask))'.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PyProtocols/src/protocols/advice.py.diff?r1=1.11&r2=1.12
http://cvs.eby-sarna.com/PyProtocols/src/protocols/predicates.py.diff?r1=1.11&r2=1.12
http://cvs.eby-sarna.com/PyProtocols/src/protocols/dispatch.py.diff?r1=1.13&r2=1.14
http://cvs.eby-sarna.com/PyProtocols/src/protocols/tests/test_advice.py.diff?r1=1.7&r2=1.8

To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 PyProtocols/src/protocols/advice.py \
    PyProtocols/src/protocols/predicates.py
cvs rdiff -r1.13 -r1.14 PyProtocols/src/protocols/dispatch.py
cvs rdiff -r1.7 -r1.8 PyProtocols/src/protocols/tests/test_advice.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