MCPcopy Index your code
hub / github.com/python/cpython / format_array

Function format_array

Tools/scripts/long_conv_tables.py:10–19  ·  view source on GitHub ↗
(name, values)

Source from the content-addressed store, hash-verified

8
9
10def format_array(name, values):
11 values = [str(v) for v in values]
12 values = ', '.join(values)
13 result = f'{name} = {{{values}}};'
14 result = textwrap.wrap(
15 result,
16 initial_indent=' ' * 4,
17 subsequent_indent=' ' * 8,
18 )
19 return '\n'.join(result)
20
21
22def conv_tables(long_bits):

Callers 1

conv_tablesFunction · 0.85

Calls 3

strFunction · 0.85
joinMethod · 0.45
wrapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…