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

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