[C++-sig] [] subscript notation with boost::python

Maik Beckmann beckmann.maik at googlemail.com
Mon Feb 23 20:04:16 CET 2009

troy d. straszheim schrieb am Montag 23 Februar 2009 um 19:51:
> Maik Beckmann wrote:
> > Considering what Murray done so far, I really doubt he makes this kind of
> > a mistake.  :P
> Experts can make this mistake too.  I wasn't being condescending.  The
> error message speaks for itself:
>    "Boost.Python.class' object is unsubscriptable"
> If the problem was what you think it is, I believe the error message
> would be about c++-to-python conversions, bad function signatures or
> somesuch...

You are right, the error message looks like this
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
    Subscriptable.__getitem__(Subscriptable, int)
did not match C++ signature:
    __getitem__(Subscriptable {lvalue})
and I am wrong :(

Best Regards anyway :)  
-- Maik

More information about the Cplusplus-sig mailing list