bibble.util.pair_stack
Type Aliases
Classes
A pair of middleware stacks, |
Module Contents
- bibble.util.pair_stack.UniMiddleware: TypeAlias = API.UniMiddleware
- class bibble.util.pair_stack.PairStack[source]
A pair of middleware stacks, allowing reader/writer pairs to be added at the same time
The read stack is Fifo, the write stack is Lifo. So any transforms are undone in the correct order before writing. Parse[m1, m2, m3] -> Write[m3, m2, m1]
eg: Parse[LatexToUnicode, SplitName] -> Write[MergeNames, UnicodeToLatex]
- add(
- *bidis,
- read=None,
- write=None,
Add middlewares to the read/write stacks. Args must be bidirection, and will be added to both. kwargs ‘read’ and ‘write’ just add to specific stacks
- _read_time: jgdv.Fifo[Middleware]
- _write_time: jgdv.Lifo[Middleware]