[Python-Dev] Exception needed: Not enough arguments to PyArg_ParseTuple
I had PyArg_ParseTuple(args, s#s#i:compare, p1, bytes1, p2, bytes2) in a program. There are not enough arguments to PyArg_ParseTuple. Does PyArg_ParseTuple know how many arguments it is getting? If so, I suggest that an exception should be raised here. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Exception needed: Not enough arguments to PyArg_ParseTuple
Edward C. Jones [EMAIL PROTECTED] writes: I had PyArg_ParseTuple(args, s#s#i:compare, p1, bytes1, p2, bytes2) in a program. There are not enough arguments to PyArg_ParseTuple. Does PyArg_ParseTuple know how many arguments it is getting? I don't think so. If so, I suggest that an exception should be raised here. I think you'd need to do battle with ISO C first. Cheers, mwh -- Counting lines is probably a good idea if you want to print it out and are short on paper, but I fail to see the purpose otherwise. -- Erik Naggum, comp.lang.lisp ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Exception needed: Not enough arguments to PyArg_ParseTuple
Edward C. Jones wrote: I had PyArg_ParseTuple(args, s#s#i:compare, p1, bytes1, p2, bytes2) in a program. There are not enough arguments to PyArg_ParseTuple. Does PyArg_ParseTuple know how many arguments it is getting? No. There is no standard way for a C function to find out how many parameters it has been passed, and most C implementations don't provide any way at all. That's why the calling interface to varargs functions invariably includes some way for the caller to indicate the number of arguments, such as a format string or a terminating NULL. -- Greg Ewing, Computer Science Dept, +--+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | [EMAIL PROTECTED] +--+ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com