I am working on exposing a bigint class to python. Now I've got the
problem that methods which take an bigint as
an parameter do not accept Python longs.
Traceback (most recent call last):
File "test.py", line 132, in ?
Boost.Python.ArgumentError: Python argument types in
did not match C++ signature:
I don't know how to achieve implicit conversion at this point, turning an
long automatically into an bigint. The other way round, turning an bigint
into long can be realized by defining __long__.
Can someone help me please?
Re: implicit conversion
Benjamin Schmeling <Benjamin_Schmeling@gmx.de> wrote:
> I don't know how to achieve implicit conversion at this point, turning an
> long automatically into an bigint. The other way round, turning an bigint
> into long can be realized by defining __long__.
Perhaps adding to your bigint class a constructor (not declared as
``explicit'', if you're coding C++) which accepts as its argument a
python long might help...?
|All times are GMT. The time now is 06:13 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.