def py3compatible(f):
if sys.version_info >= (3,0):
def wrapped_f(*args, **kwargs):
args = [tbs(a) if isinstance(a, str) else a for a in args]
kwargs = {k: tbs(v) if isinstance(v, str) else v for k, v in kwargs.items()}
return f(*args, **kwargs)
return wrapped_f
else:
return f
from our experience most users still use Python 2. We haven't really tested it with Python 3. Did you experience other problems except what you mentioned with strings?
Thanks for the code by the way.