Skip to content
Commit 23a4e53b authored by Daniel Silverstone's avatar Daniel Silverstone
Browse files

_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: default avatarDaniel Silverstone <daniel.silverstone@codethink.co.uk>
parent a22b2604
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment