From 92f311f91952623a83b6cb5c31f6e3c7c052df16 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Fri, 28 Sep 2007 13:55:51 -0300 Subject: [PATCH] Bugfix: handle empty lists on as_table(). --- seqtools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/seqtools.py b/seqtools.py index 13e6eac..d3de929 100644 --- a/seqtools.py +++ b/seqtools.py @@ -92,6 +92,8 @@ def as_table(obj): if hasattr(i, '__iter__'): return obj return (obj,) + else: + return ((),) # empty table if __name__ == '__main__': @@ -128,3 +130,5 @@ if __name__ == '__main__': print f(dict(a=1, b=2)) + print f([]) + -- 2.43.0