On Mon, Feb 8, 2016 at 9:22 PM, <c...@isbd.net> wrote: >> Once you switch to Python 3 and Phoenix you have to modify this >> slightly, e.g. by adding this to the top of your code: >> >> try: >> basestring >> except: >> basestring = (bytes,str) >> > Everything else is 3 compatible so moving should be fairly painless > if/when phoenix becomes available.
Small point: Even for code as small as this, I would be inclined to catch only the one exception you care about - in this case, NameError. I try to avoid having a bare except clause anywhere other than a "log and continue" or "react and reraise" kind of situation. ChrisA -- https://mail.python.org/mailman/listinfo/python-list