Jump to revision: | |
---|---|
Author: | pje |
Date: | Sat Mar 3 17:41:05 2007 UTC (17 years, 2 months ago) |
Log Message:
Implement better scoping, by allowing states to be context managers. Also, renamed setting->value and parameter->expression. Expressions scan be scoped to services, such that a "resource" is just an "Action.expression" (i.e. an expression scoped to the nearest Action service). Instead of using 'with service_instance:', you now use 'with service_class.new():' to replace a service. The next refactoring will change keys from being functions, to being objects, allowing them to be set to either values or expressions dynamically. As a side-effect, this will drop the dependencies to both the SymbolType and ProxyTypes packages, although that's not the reason for doing it. The real reason is that it will allow things like this:: with context.new(): some_var << some_value other_var <<= lambda:some_expression # code that uses these variables as the canonical way to set variables in a context.
Changed paths:
Path | Action | Text Changes | Prop Changes | Diff to Previous |
---|---|---|---|---|
Contextual/Contextual.txt | modified | X | (diff to previous) | |
Contextual/README.txt | modified | X | (diff to previous) | |
Contextual/context_tests.txt | modified | X | (diff to previous) | |
Contextual/peak/context.py | modified | X | (diff to previous) |
cvs-admin@eby-sarna.com Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |