Is there any way to have the default loader for PyYaml be CLoader. So instead of having to do
yaml.load(f, Loader=yaml.CLoader)
It would just default to CLoader, so I could do:
yaml.load(f)
Is there any way to have the default loader for PyYaml be CLoader. So instead of having to do
yaml.load(f, Loader=yaml.CLoader)
It would just default to CLoader, so I could do:
yaml.load(f)
I think what you are looking for is functools.partial:
import functools
myload=functools.partial(yaml.load,Loader=yaml.CLoader)
myload(f)