Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ globals
Function
globals
crates/vm/src/stdlib/builtins.rs:642–644 ·
view source on GitHub ↗
(vm: &VirtualMachine)
Source
from the content-addressed store, hash-verified
640
641
#[pyfunction]
642
fn globals(vm: &VirtualMachine) -> PyDictRef {
643
vm.current_globals()
644
}
645
646
#[pyfunction]
647
fn hasattr(obj: PyObjectRef, attr: PyObjectRef, vm: &VirtualMachine) -> PyResult<bool> {
Callers
15
pystone.py
File · 0.85
symtable.py
File · 0.85
_exists
Function · 0.85
os.py
File · 0.85
locale.py
File · 0.85
_init_categories
Function · 0.85
signal.py
File · 0.85
hashlib.py
File · 0.85
sre_compile.py
File · 0.85
inspect.py
File · 0.85
plistlib.py
File · 0.85
_normalize_module
Function · 0.85
Calls
1
current_globals
Method · 0.80
Tested by
15
_normalize_module
Function · 0.68
test_timeit_globals_args
Method · 0.68
test_globals_shadow_builtins
Method · 0.68
test_cannot_replace_builtins_dict_while_active
Method · 0.68
test_cannot_replace_builtins_dict_between_calls
Method · 0.68
set_break
Method · 0.68
add_foreign_method
Method · 0.68
test_basic
Method · 0.68
checkModule
Method · 0.68
test___globals__
Method · 0.68
test_forward_equality_get_type_hints
Method · 0.68
test_forward_equality_hash
Method · 0.68