more sensible check
works also for numpy arrays. Not sure why the old way is considered to be "pythonic", I think it can just cause trouble
This commit is contained in:
parent
48c9d31720
commit
76984a4dbd
|
@ -71,7 +71,7 @@ def croak(what, newline = True):
|
||||||
Separate items of what by newline. Defaults to True.
|
Separate items of what by newline. Defaults to True.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if what:
|
if what is not None:
|
||||||
sys.stderr.write(srepr(what,glue = '\n') + ('\n' if newline else ''))
|
sys.stderr.write(srepr(what,glue = '\n') + ('\n' if newline else ''))
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue