New submission from Jean-Paul Calderone <inva...@example.invalid>: >>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) >>> s.bind(('', 0)) >>> s.sendto(u'hellé', s.getsockname()) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: sendto() takes exactly 3 arguments (2 given) >>> s.sendto(3, s.getsockname()) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: sendto() takes exactly 3 arguments (2 given) >>> s.sendto('hello', s.getsockname()) 5
The TypeError gives the wrong explanation for what's wrong. ---------- components: Library (Lib) messages: 119320 nosy: exarkun priority: normal severity: normal status: open title: socket.sendto raises incorrect exception when passed incorrect types type: behavior versions: Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10169> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com