MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __instancecheck__

Method __instancecheck__

tools/python-3.11.9-amd64/Lib/ast.py:531–544  ·  view source on GitHub ↗
(cls, inst)

Source from the content-addressed store, hash-verified

529 cls.__doc__ = """Deprecated AST node class. Use ast.Constant instead"""
530
531 def __instancecheck__(cls, inst):
532 if not isinstance(inst, Constant):
533 return False
534 if cls in _const_types:
535 try:
536 value = inst.value
537 except AttributeError:
538 return False
539 else:
540 return (
541 isinstance(value, _const_types[cls]) and
542 not isinstance(value, _const_types_not.get(cls, ()))
543 )
544 return type.__instancecheck__(cls, inst)
545
546def _new(cls, *args, **kwargs):
547 for key in kwargs:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected