MCPcopy Create free account
hub / github.com/numpy/numpy / _split_line

Function _split_line

numpy/lib/utils.py:430–447  ·  view source on GitHub ↗
(name, arguments, width)

Source from the content-addressed store, hash-verified

428# characters. End lines on a comma and begin argument list indented with
429# the rest of the arguments.
430def _split_line(name, arguments, width):
431 firstwidth = len(name)
432 k = firstwidth
433 newstr = name
434 sepstr = ", "
435 arglist = arguments.split(sepstr)
436 for argument in arglist:
437 if k == firstwidth:
438 addstr = ""
439 else:
440 addstr = sepstr
441 k = k + len(argument) + len(addstr)
442 if k > width:
443 k = firstwidth + 1 + len(argument)
444 newstr = newstr + ",\n" + " "*(firstwidth+2) + argument
445 else:
446 newstr = newstr + addstr + argument
447 return newstr
448
449_namedict = None
450_dictlist = None

Callers 1

infoFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected