MCPcopy Index your code
hub / github.com/python/cpython / Y

Method Y

Lib/test/test_inspect/test_inspect.py:2141–2145  ·  view source on GitHub ↗
(le)

Source from the content-addressed store, hash-verified

2139
2140 # The infamous Y combinator.
2141 def Y(le):
2142 def g(f):
2143 return le(lambda x: f(f)(x))
2144 Y.g_ref = g
2145 return g(g)
2146
2147 def check_y_combinator(func):
2148 self.assertEqual(_nonlocal_vars(func), {'f': Y.g_ref})

Callers

nothing calls this directly

Calls 1

gFunction · 0.50

Tested by

no test coverage detected