MCPcopy Create free account
hub / github.com/scanny/python-pptx / __eq__

Method __eq__

src/pptx/shared.py:24–33  ·  view source on GitHub ↗

Return |True| if this proxy object refers to the same oxml element as does *other*. ElementProxy objects are value objects and should maintain no mutable local state. Equality for proxy objects is defined as referring to the same XML element, whether or not they are the same

(self, other: object)

Source from the content-addressed store, hash-verified

22 self._element = element
23
24 def __eq__(self, other: object) -> bool:
25 """Return |True| if this proxy object refers to the same oxml element as does *other*.
26
27 ElementProxy objects are value objects and should maintain no mutable local state.
28 Equality for proxy objects is defined as referring to the same XML element, whether or not
29 they are the same proxy object instance.
30 """
31 if not isinstance(other, ElementProxy):
32 return False
33 return self._element is other._element
34
35 def __ne__(self, other: object) -> bool:
36 if not isinstance(other, ElementProxy):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected