_yaml.py: Remove use of `isinstance()` from `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 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