diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2008-12-23 09:02:15 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2008-12-23 09:02:15 +0000 |
commit | ed916ff07cf2f1fbb6056cdc01fe3ae82a027ed5 (patch) | |
tree | 7c76fd9eeb3ef49e2aae7a5c71455c8ad201868f /numpy/f2py/rules.py | |
parent | 31c520d78424bb35e2b7863ae0c727c20091b19a (diff) | |
download | numpy-ed916ff07cf2f1fbb6056cdc01fe3ae82a027ed5.tar.gz |
Fix issue 964: f2py python 2.6, 2.6.1 support.
Diffstat (limited to 'numpy/f2py/rules.py')
-rw-r--r-- | numpy/f2py/rules.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py index 825b13b23..ef4b9cc34 100644 --- a/numpy/f2py/rules.py +++ b/numpy/f2py/rules.py @@ -245,7 +245,7 @@ static PyObject *#apiname#(const PyObject *capi_self, f2py_start_clock(); #endif \tif (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\\ -\t\t\"#argformat#|#keyformat##xaformat#:#pyname#\",\\ +\t\t\"#argformat##keyformat##xaformat#:#pyname#\",\\ \t\tcapi_kwlist#args_capi##keys_capi##keys_xa#))\n\t\treturn NULL; #frompyobj# /*end of frompyobj*/ @@ -1355,6 +1355,16 @@ def buildapi(rout): rd['latexdocstrsigns']=rd['latexdocstrsigns']+rd[k][0:1]+\ ['\\begin{description}']+rd[k][1:]+\ ['\\end{description}'] + + # Workaround for Python 2.6, 2.6.1 bug: http://bugs.python.org/issue4720 + if rd['keyformat'] or rd['xaformat']: + argformat = rd['argformat'] + if isinstance(argformat, list): + argformat.append('|') + else: + assert isinstance(argformat, str),repr((argformat, type(argformat))) + rd['argformat'] += '|' + ar=applyrules(routine_rules,rd) if ismoduleroutine(rout): outmess('\t\t\t %s\n'%(ar['docshort'])) |