Skip to content
Snippets Groups Projects
Commit c6ed9275 authored by Daniel Silverstone's avatar Daniel Silverstone
Browse files

_yaml.py: Implement `get()` for `ChainMap`


Since the core Python `ChainMap.get()` implements with:

    self[key] if key in self else default

The double-chain-lookup is expensive.  This simple change solves that
for our ChainMap derived structure.

Signed-off-by: default avatarDaniel Silverstone <daniel.silverstone@codethink.co.uk>
parent 48860aac
Branches
Tags
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment