ValueOpcodeMapUpdate

class dsviper.ValueOpcodeMapUpdate

Bases: ValueOpcode

Writes entries over the keys the map at a path already holds, inserting none.

An entry whose key the map does not hold is left out, where ValueMap.update inserts it - ValueOpcodeMapUnion is the opcode that does.

Note: Not directly instantiable.

arguments(definitions: DefinitionsConst, *, encoded: bool = True) → tuple[Attachment, ValueKey, PathConst, ValueMap]

Return (attachment, key, path, value), resolving the ids the opcode carries against definitions.

encoded=False returns a Value rather than a native object.

key() → ValueOpcodeKey

Return the ValueOpcodeKey the opcode applies to - the attachment, the instance and its concept.

path() → PathConst

Return the Path inside the document the opcode writes at.

type() → str

Return ‘Map_Update’, the name of this opcode’s kind.

value() → ValueMap

Return the entries the opcode writes over the keys already there.