Package lepl :: Package support :: Module context :: Class Namespace
[hide private]
[frames] | no frames]

Class Namespace

source code


A store for global definitions.
Instance Methods [hide private]
 
__init__(self, base=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
push(self, extra=None)
Copy the current state to the stack and modify it.
source code
 
pop(self)
Return the previous state from the stack.
source code
 
__enter__(self)
Allow use within a with context by duplicating the current state and saving to the stack.
source code
 
__exit__(self, *_args)
Restore the previous state from the stack on leaving the context.
source code
 
current(self)
The current state (a map from names to operator implementations).
source code
 
set(self, name, value)
Set a value.
source code
 
set_if_not_none(self, name, value)
Set a value if it is not None.
source code
 
get(self, name, default)
Get a value if defined, else the default.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, base=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

push(self, extra=None)

source code 
Copy the current state to the stack and modify it. Values in extra that map to None are ignored.

__enter__(self)

source code 
Allow use within a with context by duplicating the current state and saving to the stack. Returns self to allow manipulation via set.