def to_buffer(f):
@functools.wraps(f)<EOL>def wrap(*args, **kwargs):<EOL><INDENT>iterator = kwargs.get('<STR_LIT>', args[<NUM_LIT:0>])<EOL>if not isinstance(iterator, Buffer):<EOL><INDENT>iterator = Buffer(iterator)<EOL><DEDENT>return f(iterator, *args[<NUM_LIT:1>:], **kwargs)<EOL><DEDENT>return wrap<EOL>
Decorator converting all strings and iterators/iterables into Buffers.