A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-January/019315.html below:

[Python-Dev] Re: PyArg_ParseTuple

[Python-Dev] Re: PyArg_ParseTuple [Python-Dev] Re: PyArg_ParseTupleWalter Dörwald walter@livinglogic.de
Wed, 09 Jan 2002 17:02:13 +0100
Guido van Rossum wrote:

> [...]
> No, you should test for PyTuple_Check before calling
> PyArg_ParseTuple.  Why do you think it's called that?
> 
> The other problem with this use, alas, is that when it catches a
> legitimate error, the error it reports is confusing if you don't
> change it.  Example:
> 
> 
>>>>from socket import *
>>>>s = socket(AF_INET, SOCK_STREAM)
>>>>s.bind(())
>>>>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: getsockaddrarg() takes exactly 2 arguments (0 given)


This should be fixed by using ;error message in the format string.

Bye,
    Walter Dörwald




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4