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

Method tell

crates/vm/src/stdlib/_io.rs:1670–1680  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1668
1669 #[pymethod]
1670 fn tell(&self, vm: &VirtualMachine) -> PyResult<Offset> {
1671 let mut data = self.lock(vm)?;
1672 let raw_tell = data.raw_tell(vm)?;
1673 let raw_offset = data.raw_offset();
1674 let mut pos = raw_tell - raw_offset;
1675 // GH-95782
1676 if pos < 0 {
1677 pos = 0;
1678 }
1679 Ok(pos)
1680 }
1681
1682 #[pymethod]
1683 fn truncate(

Callers

nothing calls this directly

Implementers 1

_io.rscrates/vm/src/stdlib/_io.rs

Calls 3

raw_tellMethod · 0.80
raw_offsetMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected