[C++-sig] Re: return type of list::index(object const&)

David Abrahams david.abrahams at rcn.com
Fri Jun 28 16:15:29 CEST 2002


From: "Dave Hawkes" <daveh at cadlink.com>

> This same issue also applies to wrapping many of the API functions. My
> thought was that where a simple type can be returned directly, to use it,
> rather than construct an object. There will be many instances where the
> value is required directly and does not justify the overhead of holding
the
> value in an object.

The interesting part is that there's no direct 'C' API for list.index(), so
I end up unwrapping a Python int object. However, I sure don't want users
to have to worry about whether there's a direct 'C' API for any given
function!

-Dave







More information about the Cplusplus-sig mailing list