MCPcopy Create free account
hub / github.com/ActiveState/code / rowWrapper

Function rowWrapper

recipes/Python/267662_Table_indentation/recipe-267662.py:20–22  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

18 the table is first wrapped by this function."""
19 # closure for breaking logical rows to physical, using wrapfunc
20 def rowWrapper(row):
21 newRows = [wrapfunc(item).split('\n') for item in row]
22 return [[substr or '' for substr in item] for item in map(None,*newRows)]
23 # break each logical row into one or more physical ones
24 logicalRows = [rowWrapper(row) for row in rows]
25 # columns of physical rows

Callers 1

indentFunction · 0.70

Calls 2

mapFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected