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

Method is_text_codec

crates/vm/src/codecs.rs:69–72  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

67 }
68
69 pub fn is_text_codec(&self, vm: &VirtualMachine) -> PyResult<bool> {
70 let is_text = vm.get_attribute_opt(self.0.clone().into(), "_is_text_encoding")?;
71 is_text.map_or(Ok(true), |is_text| is_text.try_to_bool(vm))
72 }
73
74 pub fn encode(
75 &self,

Callers 2

_lookup_text_encodingMethod · 0.80
find_coderMethod · 0.80

Calls 3

get_attribute_optMethod · 0.80
try_to_boolMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected