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

Method _dist_str

numpy/distutils/ccompiler_opt.py:712–728  ·  view source on GitHub ↗

Return a string to print by log and errors.

(*args)

Source from the content-addressed store, hash-verified

710
711 @staticmethod
712 def _dist_str(*args):
713 """Return a string to print by log and errors."""
714 def to_str(arg):
715 if not isinstance(arg, str) and hasattr(arg, '__iter__'):
716 ret = []
717 for a in arg:
718 ret.append(to_str(a))
719 return '('+ ' '.join(ret) + ')'
720 return str(arg)
721
722 stack = inspect.stack()[2]
723 start = "CCompilerOpt.%s[%d] : " % (stack.function, stack.lineno)
724 out = ' '.join([
725 to_str(a)
726 for a in (*args,)
727 ])
728 return start + out
729
730 def _dist_test_spawn_paths(self, cmd, display=None):
731 """

Callers 3

dist_errorMethod · 0.80
dist_fatalMethod · 0.80
dist_logMethod · 0.80

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected