Commit db4034f0 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Add type assertions in pprint_table args

Add assertions about the types of "table" and "headers" arguments.

Refs #3365
parent e0c77eb3
......@@ -223,9 +223,11 @@ def pprint_table(out, table, headers=None, separator=None):
to this value.
"""
assert(isinstance(table, (list, tuple))), "Invalid table type"
sep = separator if separator else " "
if headers:
assert(isinstance(headers, (list, tuple))), "Invalid headers type"
table.insert(0, headers)
# Find out the max width of each column
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment