Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
93
assert r == [
'a'
, 66, None]
94
95
def
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
102
with
assert_raises(StopIteration):
103
try
:
Callers
1
syntax_generator.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected