jgdv.structs.dkey.keys
Classes
A Key for getting a redirected key. |
|
Multi keys allow 1+ explicit subkeys. |
|
Just a string, not a key. |
|
A Single key with no extras. |
Module Contents
- class jgdv.structs.dkey.keys.IndirectDKey(
- *,
- multi=False,
- re_mark=None,
- **kwargs,
Bases:
jgdv.structs.dkey.dkey.DKeyA Key for getting a redirected key. eg: RedirectionDKey(key) -> SingleDKey(value)
re_mark :
- Parameters:
multi (bool)
re_mark (jgdv.Maybe[jgdv.structs.dkey._interface.KeyMark])
- exp_generate_chains_h(
- root,
- factory,
- opts,
Lookup the indirect version, the direct version, then use the fallback
- Parameters:
factory (jgdv.structs.dkey._util._interface.InstructionFactory_p)
opts (dict)
- Return type:
list[jgdv.structs.dkey._util._interface.ExpInstChain_d | jgdv.structs.dkey._util._interface.ExpInst_d]
- multi_redir = False
- re_mark = None
- class jgdv.structs.dkey.keys.MultiDKey(*args, **kwargs)[source]
Bases:
jgdv.structs.dkey.dkey.DKeyMulti keys allow 1+ explicit subkeys.
They have additional fields:
_subkeys : parsed information about explicit subkeys
- exp_flatten_h(vals, factory, opts) <Unknown>[source]
Flatten the multi-key expansion into a single string, by using the anon-format str
- Parameters:
factory (jgdv.structs.dkey._util._interface.InstructionFactory_p)
opts (dict)
- Return type:
jgdv.Maybe[jgdv.structs.dkey._util._interface.ExpInst_d]
- exp_generate_chains_h(
- root,
- factory,
- opts,
Lift subkeys to expansion instructions
- Parameters:
factory (jgdv.structs.dkey._util._interface.InstructionFactory_p)
opts (dict)
- Return type:
list[jgdv.structs.dkey._util._interface.ExpInstChain_d | jgdv.structs.dkey._util._interface.ExpInst_d]
- class jgdv.structs.dkey.keys.NonDKey(*args, **kwargs)[source]
Bases:
jgdv.structs.dkey.dkey.DKeyJust a string, not a key.
But this lets you call no-ops for key specific methods. It can coerce itself though