MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / f

Function f

01_numbers/python/scope.py:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3global_variable = 1
4
5def f():
6 global global_variable
7 local_variable = 2
8 def subf():
9 print("local", local_variable)
10 print("global", global_variable)
11 enclosed_variable = 3
12 #local_variable = 5
13 subf()
14 #print("enclosed", enclosed_variable)
15 global_variable = 9
16 local_variable = 1
17 print("global", global_variable)
18 print("local", local_variable)
19 # example use of built-in scope
20 blah = int("42")
21
22
23if __name__ == '__main__':

Callers 2

scope.pyFile · 0.85
withMethod · 0.85

Calls 2

subfFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected