diff textshaper/quote.py @ 27:4aba57a33376

add decorator for converting text to lines of text
author Jeff Hammel <k0scist@gmail.com>
date Sun, 23 Feb 2014 13:54:18 -0800
parents c23782a7b7ba
children
line wrap: on
line diff
--- a/textshaper/quote.py	Sun Feb 23 11:41:37 2014 -0800
+++ b/textshaper/quote.py	Sun Feb 23 13:54:18 2014 -0800
@@ -17,8 +17,7 @@
     close_quote -- closing quote character, if different from opening quote
     """
 
-    if close_quote is None:
-        close_quote = quote
+    close_quote = quote if close_quote is None else close_quote
     return ["{}{}{}".format(quote, line, close_quote) for line in lines]