MCPcopy Index your code
hub / github.com/ipython/ipython / text

Method text

IPython/lib/pretty.py:234–247  ·  view source on GitHub ↗

Add literal text to the output.

(self, obj)

Source from the content-addressed store, hash-verified

232 self._break_one_group(group)
233
234 def text(self, obj):
235 """Add literal text to the output."""
236 width = len(obj)
237 if self.buffer:
238 text = self.buffer[-1]
239 if not isinstance(text, Text):
240 text = Text()
241 self.buffer.append(text)
242 text.add(obj, width)
243 self.buffer_width += width
244 self._break_outer_groups()
245 else:
246 self.output.write(obj)
247 self.output_width += width
248
249 def breakable(self, sep=' '):
250 """

Callers 14

begin_groupMethod · 0.95
_enumerateMethod · 0.95
end_groupMethod · 0.95
_repr_pretty_Method · 0.45
new_itemMethod · 0.45
_repr_pretty_Method · 0.45
_default_pprintFunction · 0.45
innerFunction · 0.45
_super_pprintFunction · 0.45
_repr_pretty_Method · 0.45
_type_pprintFunction · 0.45
_repr_pprintFunction · 0.45

Calls 4

addMethod · 0.95
_break_outer_groupsMethod · 0.95
TextClass · 0.85
writeMethod · 0.45

Tested by

no test coverage detected