Bruno Cauet added the comment: I took the liberty of putting together a small patch which makes from_bytes() call & return type(value_found) if type != long (Serhiy's & my 2nd solution).
Ethan: in that case, type.from_bytes() would always return an int, and not resort to build-a-pseudo-int, right? That way not overriding from_bytes() would not result in strange behaviour. ---------- Added file: http://bugs.python.org/file38447/0001-int.from_bytes-calls-constructor-for-subclasses.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23640> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com