MCPcopy Create free account
hub / github.com/ipython/ipython / begin_group

Method begin_group

IPython/lib/pretty.py:264–276  ·  view source on GitHub ↗

Begin a group. The first parameter specifies the indentation for the next line (usually the width of the opening text), the second the opening text. All parameters are optional.

(self, indent=0, open='')

Source from the content-addressed store, hash-verified

262
263
264 def begin_group(self, indent=0, open=''):
265 """
266 Begin a group.
267 The first parameter specifies the indentation for the next line (usually
268 the width of the opening text), the second the opening text. All
269 parameters are optional.
270 """
271 if open:
272 self.text(open)
273 group = Group(self.group_stack[-1].depth + 1)
274 self.group_stack.append(group)
275 self.group_queue.enq(group)
276 self.indentation += indent
277
278 def _enumerate(self, seq):
279 """like enumerate, but with an upper limit on the number of items"""

Callers 6

groupMethod · 0.80
prettyMethod · 0.80
_default_pprintFunction · 0.80
innerFunction · 0.80
_super_pprintFunction · 0.80
_exception_pprintFunction · 0.80

Calls 3

textMethod · 0.95
GroupClass · 0.85
enqMethod · 0.80

Tested by

no test coverage detected