mirror of https://github.com/mahmoud/boltons.git
strengthen the max_depth check
This commit is contained in:
parent
0a3755a04b
commit
e531c20f56
|
@ -192,8 +192,8 @@ class Table(object):
|
|||
# TODO: seen/cycle detection/reuse ?
|
||||
# maxdepth follows the same behavior as find command
|
||||
# i.e., it doesn't work if max_depth=0 is passed in
|
||||
if not max_depth:
|
||||
return cls(headers=headers)
|
||||
if max_depth < 1:
|
||||
return cls(headers=headers) # return data instead?
|
||||
is_seq = isinstance(data, Sequence)
|
||||
if is_seq:
|
||||
if not data:
|
||||
|
|
Loading…
Reference in New Issue