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

Function getgroups

crates/vm/src/stdlib/posix.rs:467–473  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

465
466 #[pyfunction]
467 fn getgroups(vm: &VirtualMachine) -> PyResult<Vec<PyObjectRef>> {
468 let group_ids = getgroups_impl().map_err(|e| e.into_pyexception(vm))?;
469 Ok(group_ids
470 .into_iter()
471 .map(|gid| vm.ctx.new_int(gid.as_raw()).into())
472 .collect())
473 }
474
475 #[pyfunction]
476 pub(super) fn access(path: OsPath, mode: u8, vm: &VirtualMachine) -> PyResult<bool> {

Callers 1

getgroups_implFunction · 0.85

Calls 7

getgroups_implFunction · 0.85
collectMethod · 0.80
into_pyexceptionMethod · 0.45
mapMethod · 0.45
into_iterMethod · 0.45
new_intMethod · 0.45
as_rawMethod · 0.45

Tested by

no test coverage detected