class ContextMask(object): (source)
Known subclasses: codetools.contexts.masks.index_context_mask.IndexContextMask
BaseClass that is used for implementing with-statement Derived classes of this base class will override the 'get_indices' method to obtain the right set of indices, depending on the expected behavior of the mask. They could be several applications of masks: 1. Related to index of the context, 2. Related to names in the dictionary of the context, etc...
Method | __enter__ |
Method to be overwritten for a mask class. |
Method | __exit__ |
Method to be overwritten for a mask class |
Method | __init__ |
Condition should be a string saying 'index < <value>' |
Method | get |
This method will return the right set of indices in order to obtain the expected behavior of the mask. |
Instance Variable | context |
Undocumented |
Instance Variable | indices |
Undocumented |
Instance Variable | init |
Undocumented |
Instance Variable | value |
Undocumented |
Method to be overwritten for a mask class. This is the block that is after the try statement, in the try-finally block obtained equivalent to the with statement.
Method to be overwritten for a mask class This is the block that is after the finally statement, in the try-finally block obtained equivalent to the with statement.