MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_encode_err

Function is_encode_err

crates/vm/src/codecs.rs:1129–1131  ·  view source on GitHub ↗
(err: &PyObject, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1127
1128#[inline]
1129fn is_encode_err(err: &PyObject, vm: &VirtualMachine) -> bool {
1130 err.fast_isinstance(vm.ctx.exceptions.unicode_encode_error)
1131}
1132#[inline]
1133fn is_decode_err(err: &PyObject, vm: &VirtualMachine) -> bool {
1134 err.fast_isinstance(vm.ctx.exceptions.unicode_decode_error)

Callers 7

ignore_errorsFunction · 0.85
replace_errorsFunction · 0.85
xmlcharrefreplace_errorsFunction · 0.85
backslashreplace_errorsFunction · 0.85
namereplace_errorsFunction · 0.85
surrogatepass_errorsFunction · 0.85
surrogateescape_errorsFunction · 0.85

Calls 1

fast_isinstanceMethod · 0.80

Tested by

no test coverage detected