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

Method __eq__

src/pptx/shapes/base.py:32–40  ·  view source on GitHub ↗

|True| if this shape object proxies the same element as *other*. Equality for proxy objects is defined as referring to the same XML element, whether or not they are the same proxy object instance.

(self, other: object)

Source from the content-addressed store, hash-verified

30 self._parent = parent
31
32 def __eq__(self, other: object) -> bool:
33 """|True| if this shape object proxies the same element as *other*.
34
35 Equality for proxy objects is defined as referring to the same XML element, whether or not
36 they are the same proxy object instance.
37 """
38 if not isinstance(other, BaseShape):
39 return False
40 return self._element is other._element
41
42 def __ne__(self, other: object) -> bool:
43 if not isinstance(other, BaseShape):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected