Issue 803498: plat-mac/applesingle.py needs cosmetic changes (original) (raw)

  1. it uses a string exception
  2. it has a warning every time you use it: /Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/plat-mac/applesingle.py:40: FutureWarning: %u/ %o/%x/%X of negative int will return a signed string in Python 2.4 and up
  3. its decode function overloads builtin names (input, id) and uses type(input) == type('') when it really means: isinstance(input, basestring).. or maybe even better: not hasattr(input, 'read')
  4. it can be useful on platforms other than MacOS (bub-n- bob uses it for example)

Attached is a revamped and backwards compatible version.