MCPcopy
hub / github.com/Textualize/rich / __add__

Method __add__

rich/text.py:179–184  ·  view source on GitHub ↗
(self, other: Any)

Source from the content-addressed store, hash-verified

177 return f"<text {self.plain!r} {self._spans!r} {self.style!r}>"
178
179 def __add__(self, other: Any) -> "Text":
180 if isinstance(other, (str, Text)):
181 result = self.copy()
182 result.append(other)
183 return result
184 return NotImplemented
185
186 def __eq__(self, other: object) -> bool:
187 if not isinstance(other, Text):

Callers 1

test_addFunction · 0.45

Calls 2

copyMethod · 0.95
appendMethod · 0.45

Tested by 1

test_addFunction · 0.36