[C++-sig] Boost.Python not resolving overloads
Niall Douglas
s_sourceforge at nedprod.com
Sun Sep 21 03:08:57 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>> from TnFOX import *
>>> fh=FXFile("fred.txt")
>>> print fh.name()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
Boost.Python.ArgumentError: Python argument types in
FXFile.name()
did not match C++ signature:
name(class FX::FXString)
name(class FX::FXFile {lvalue})
>>> print fh.name(fh)
fred.txt
As it says, there are two name()'s defined. I tried a number of other
functions with no parameters and all of them cause an error if there
are overloads present. The only way to make them work is to include
the instance as the first parameter.
Is this right? It's counter-intuitive and inconvenient - surely
boost.python can try inserting the instance if no parameters are
present?
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP2z6KcEcvDLFGKbPEQJcSgCfZNc5wkAmHRBa0oXDomv1477lk00AoKTS
18vL47KQJtCgO9sT3xv6yJZT
=eQsv
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list