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

Method expandtabs

crates/vm/src/builtins/str.rs:1346–1352  ·  view source on GitHub ↗
(&self, args: anystr::ExpandTabsArgs, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1344
1345 #[pymethod]
1346 fn expandtabs(&self, args: anystr::ExpandTabsArgs, vm: &VirtualMachine) -> PyResult<String> {
1347 // TODO: support WTF-8
1348 Ok(rustpython_common::str::expandtabs(
1349 self.try_as_utf8(vm)?.as_str(),
1350 args.tabsize(),
1351 ))
1352 }
1353
1354 #[pymethod]
1355 pub fn isidentifier(&self) -> bool {

Callers

nothing calls this directly

Calls 4

try_as_utf8Method · 0.80
tabsizeMethod · 0.80
expandtabsFunction · 0.50
as_strMethod · 0.45

Tested by

no test coverage detected