New submission from Filip Gruszczyński <grusz...@gmail.com>: xdrlib defines ConversionError, but very seldom uses it. For example:
def pack_float(self, x): try: self.__buf.write(struct.pack('>f', x)) except struct.error as msg: raise ConversionError(msg) But it doesn't do so here: def pack_uint(self, x): self.__buf.write(struct.pack('>L', x)) Shouldn't that be more consistent? I am happy to write a patch, that will make xdrlib raise ConversionError, as well as write proper test (I believe xdrlib tests should get some love altogether, so I would add a separate test case for this). ---------- components: Library (Lib) messages: 132309 nosy: gruszczy priority: normal severity: normal status: open title: xdrlib raises ConversionError in inconsistent way type: behavior versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11694> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com