A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-September/048925.html below:

[Python-Dev] PyExc_UnicodeDecodeError

[Python-Dev] PyExc_UnicodeDecodeError [Python-Dev] PyExc_UnicodeDecodeErrorThomas Heller theller at python.net
Wed Sep 15 17:27:24 CEST 2004
Can anyone explain why calling this code in a C extension

static PyObject *
test(PyObject *self, PyObject *arg)
{
        PyErr_SetString(PyExc_UnicodeDecodeError, "blah blah");
        return NULL;
}

PyMethodDef module_methods[] = {
        {"test", test, METH_NOARGS},
        {NULL, NULL}
};


does this (same in 2.3.4, and 2.4 current CVS):

>>> from somewhere import test
>>> test()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: function takes exactly 5 arguments (1 given)
>>>

Thomas

More information about the Python-Dev mailing list

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