-
- Downloads
You need to sign in or sign up before continuing.
_yaml.py: Reduce use of `isinstance()` in `node_sanitize()`
We know that nodes are typically one of:
str, list, dict, bool, tuple, NoneType or our ChainMap
Of these, dict and ChainMap are Mapping, only list is list
and the rest are returned unchanged. We can reduce/defer our use
of isinstance here, dramatically, improving performance.
Signed-off-by:
Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Loading
Please register or sign in to comment