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

Function _compare_attributes

Lib/ast.py:472–485  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

470 return True
471
472 def _compare_attributes(a, b):
473 if a._attributes != b._attributes:
474 return False
475 # Attributes are always ints.
476 for attr in a._attributes:
477 a_attr = getattr(a, attr, sentinel)
478 b_attr = getattr(b, attr, sentinel)
479 if a_attr is sentinel and b_attr is sentinel:
480 # both nodes are missing an attribute at runtime
481 continue
482 if a_attr != b_attr:
483 return False
484 else:
485 return True
486
487 if type(a) is not type(b):
488 return False

Callers 1

compareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…