more document for limitation of parameter list, and doc of removal of -apply in CHANGES.current
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
371f40be2d
commit
75eb4d20d6
2 changed files with 22 additions and 3 deletions
|
|
@ -20,6 +20,10 @@ Version 1.3.37 (in progress)
|
||||||
"Python 3 Support" section in the "SWIG and Python" chapter of SWIG
|
"Python 3 Support" section in the "SWIG and Python" chapter of SWIG
|
||||||
documentation.
|
documentation.
|
||||||
|
|
||||||
|
The "-apply" command line option and support of generating codes
|
||||||
|
using apply() is removed. Since this is only required by very old
|
||||||
|
Python.
|
||||||
|
|
||||||
This merge also patched SWIG's parser to solve a bug. By this patch,
|
This merge also patched SWIG's parser to solve a bug. By this patch,
|
||||||
SWIG features able to be correctly applied on C++ conversion operator,
|
SWIG features able to be correctly applied on C++ conversion operator,
|
||||||
such like this:
|
such like this:
|
||||||
|
|
|
||||||
|
|
@ -4988,8 +4988,7 @@ SWIG.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <tt>-py3</tt> option will enable function annotation support. When used
|
The <tt>-py3</tt> option will enable function annotation support. When used
|
||||||
SWIG is able to generate proxy method definitions like
|
SWIG is able to generate proxy method definitions like this:
|
||||||
this:
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="code"><pre>
|
<div class="code"><pre>
|
||||||
|
|
@ -4997,7 +4996,23 @@ this:
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For details of usage of function annotation, see PEP 3107.
|
Also, even if without passing SWIG the <tt>-py3</tt> option, the parameter list
|
||||||
|
still could be generated:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="code"><pre>
|
||||||
|
def foo(self, bar = 0): ...
|
||||||
|
</pre></div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
But for overloaded function or method, the parameter list would fallback to
|
||||||
|
<tt>*args</tt> or <tt>self, *args</tt>, and <tt>**kwargs</tt> may be append
|
||||||
|
depend on whether you enabled the keyword argument. This fallback is due to
|
||||||
|
all overloaded functions share the same function in SWIG generated proxy class.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
For detailed usage of function annotation, see PEP 3107.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3><a name="Python_nn75"></a>30.12.2 Buffer interface</H3>
|
<H3><a name="Python_nn75"></a>30.12.2 Buffer interface</H3>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue