This function returns True or False depending on the host platform. Examples: if check_impl_detail(): # only on CPython (default) if check_impl_detail(jython=True): # only on Jython if check_impl_detail(cpython=False): # everywhere except on CPy
(**guards)
| 1373 | # Use the following check to guard CPython's implementation-specific tests -- |
| 1374 | # or to run them only on the implementation(s) guarded by the arguments. |
| 1375 | def check_impl_detail(**guards): |
| 1376 | """This function returns True or False depending on the host platform. |
| 1377 | Examples: |
| 1378 | if check_impl_detail(): # only on CPython (default) |
| 1379 | if check_impl_detail(jython=True): # only on Jython |
| 1380 | if check_impl_detail(cpython=False): # everywhere except on CPython |
| 1381 | """ |
| 1382 | guards, default = _parse_guards(guards) |
| 1383 | return guards.get(sys.implementation.name, default) |
| 1384 | |
| 1385 | |
| 1386 | def no_tracing(func): |
searching dependent graphs…