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

Class MyList

tests/test_pretty.py:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23class MyList(object):
24 def __init__(self, content):
25 self.content = content
26
27 def _repr_pretty_(self, p, cycle):
28 if cycle:
29 p.text("MyList(...)")
30 else:
31 with p.group(3, "MyList(", ")"):
32 for i, child in enumerate(self.content):
33 if i:
34 p.text(",")
35 p.breakable()
36 else:
37 p.breakable("")
38 p.pretty(child)
39
40
41class MyDict(dict):

Callers 1

test_indentationFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_indentationFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…