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

Function eval_formatter_no_slicing_check

tests/test_text.py:71–81  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

69
70
71def eval_formatter_no_slicing_check(f):
72 ns = dict(n=12, pi=math.pi, stuff="hello there", os=os)
73
74 s = f.format("{n:x} {pi**2:+f}", **ns)
75 assert s == "c +9.869604"
76
77 s = f.format("{stuff[slice(1,4)]}", **ns)
78 assert s == "ell"
79
80 s = f.format("{a[:]}", a=[1, 2])
81 assert s == "[1, 2]"
82
83
84def test_eval_formatter():

Callers 1

test_eval_formatterFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…