close
Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
- Timestamp:
-
01/10/2011 04:33:36 PM (10 years ago)
- Author:
-
malte.appeltauer
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v2
|
v3
|
|
13 | 13 | ContextPy supports the layer-in-class approach and with that allows developers to define their partial methods within the scope of the actual classes these methods are contributing to. Similar to all other COP extensions so far, ContextPy provides both layers, partial methods, and dynamic scoping. |
14 | 14 | |
15 | | '''Layers''' |
16 | | In ContextPy layers are represented by regular objects that provide the identities layers need to exhibit at |
| 15 | '''Layers'''[[BR]] |
| 16 | In ContextPy layers are represented by regular objects that provide the identities layers need to exhibit at |
17 | 17 | run-time. Layer access has to be managed by the developers. |
18 | 18 | |
19 | | === Layer Composition === |
| 19 | '''Layer Composition''' |
20 | 20 | The representation of activated and deactivated layers is handled by two stacks—one for thread- |
21 | 21 | specific and one for globally activated layers. Layers can be(de-)activated using Python’s with statement or by library |
22 | 22 | methods for stack operations. |
23 | 23 | |
24 | | === Partial Methods === |
| 24 | '''Partial Methods''' |
25 | 25 | In Python, each class has its own dictionary that maps identifiers (keys) to objects (values). For instance, a method is stored with its name as key and the method object as value. We introduce a layered method descriptor that consists of all (partial) methods and a cache |