From ac19904d151f26683b69ab01f37e9199176fb91e Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Thu, 30 Oct 2014 14:50:07 -0400 Subject: [PATCH] fixed tests --- README.md | 6 +++--- coverage_report.txt | 4 ++-- glue.py | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bc8ce7e..fe7f62e 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ any number of things together even nested lists and numbers 12345 ``` Name Stmts Miss Cover Missing ------------------------------------- -glue 14 0 100% +glue 13 0 100% tests 24 0 100% ------------------------------------- -TOTAL 38 0 100% +TOTAL 37 0 100% ``` #Protip -You should probably just use [str.join](https://docs.python.org/2/library/stdtypes.html#str.join) as this is satire. \ No newline at end of file +You should probably just use [str.join](https://docs.python.org/2/library/stdtypes.html#str.join) as this is satire. diff --git a/coverage_report.txt b/coverage_report.txt index 64c6678..814eca0 100644 --- a/coverage_report.txt +++ b/coverage_report.txt @@ -1,6 +1,6 @@ Name Stmts Miss Cover Missing ------------------------------------- -glue 14 0 100% +glue 13 0 100% tests 24 0 100% ------------------------------------- -TOTAL 38 0 100% +TOTAL 37 0 100% diff --git a/glue.py b/glue.py index 7fe4d03..bf0741d 100644 --- a/glue.py +++ b/glue.py @@ -21,11 +21,13 @@ def glue(*args, **kwargs): kwargs = collections.OrderedDict( sorted(kwargs.items(), key=lambda t: t[0])) + + what_to_glue = list(args) # Ignore all your keys, because you're doing this wrong anyway - what_to_glue = list(args).extend([v for k, v in kwargs.iteritems()]) + what_to_glue.extend([v for k, v in kwargs.iteritems()]) # flatten crap out of this! - what_to_glue = _flatten(what_to_glue) + what_to_glue = _flatten(what_to_glue) # safeguard against nonstrings return " ".join([str(x) for x in what_to_glue])