comparison textshaper/decorator.py @ 34:88a69d587326

round1 of commands
author Jeff Hammel <k0scist@gmail.com>
date Sun, 02 Mar 2014 15:33:07 -0800
parents fd626585c299
children
comparison
equal deleted inserted replaced
33:de3148412191 34:88a69d587326
14 14
15 def __init__(self, function, line_separator='\n'): 15 def __init__(self, function, line_separator='\n'):
16 self.function = function 16 self.function = function
17 self.line_separator = line_separator 17 self.line_separator = line_separator
18 18
19 # record function information from function object
20 self.func_name = function.func_name
21
19 def __call__(self, text, *args, **kwargs): 22 def __call__(self, text, *args, **kwargs):
20 is_string = False 23 is_string = False
21 if isinstance(text, string): 24 if isinstance(text, string):
22 is_string = True 25 is_string = True
23 text = text.splitlines() 26 text = text.splitlines()