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

Function binary

extra_tests/snippets/syntax_generator.py:95–100  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

93assert r == ['a', 66, None]
94
95def binary(n):
96 if n <= 1:
97 return 1
98 l = yield from binary(n - 1)
99 r = yield from binary(n - 1)
100 return l + 1 + r
101
102with assert_raises(StopIteration):
103 try:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected