MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / gcd

Function gcd

example_code/item_079/parallel/my_module.py:17–23  ·  view source on GitHub ↗
(pair)

Source from the content-addressed store, hash-verified

15# limitations under the License.
16
17def gcd(pair):
18 a, b = pair
19 low = min(a, b)
20 for i in range(low, 0, -1):
21 if a % i == 0 and b % i == 0:
22 return i
23 raise RuntimeError("Not reachable")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected