ContextStack¶
-
class
tfsnippet.utils.ContextStack(initial_factory=None)¶ Bases:
objectA thread-local context stack for general purpose.
Usage:
stack = ContextStack() stack.push(dict()) # push an object to the top of thread local stack stack.top()[key] = value # use the top object stack.pop() # pop an object from the top of thread local stack
Attributes Summary
itemsMethods Summary
pop()push(context)top()Attributes Documentation
-
items¶
Methods Documentation
-
pop()¶
-
push(context)¶
-
top()¶
-