copying in Marc's r.binary fix
fix for polyglot/arity on py3.0 and py3.1