[C++-sig] Re: list.len()

David Abrahams dave at boost-consulting.com
Tue May 27 21:15:59 CEST 2003


"Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com> writes:

> --- David Abrahams <dave at boost-consulting.com> wrote:
>> We should have it, but it should be a namespace-scope function, not a
>> method.  len(some_list) and len(some_tuple) should work equally well.
>> There are actually a whole suite of these functions which ought to be
>> in the library, added to namespace boost::python::api (see
>> boost/python/object_protocol.hpp for some examples).  Patches are
>> welcome, if they include user documentation and tests!
>
> We have len() already. Look for "api_placeholder" and "len" in
> boost/libs/python/src/object/pickle_support.cpp

Hate to quibble, but...

Until it's documented and in a namespace with a permanent-sounding
name, it's still an unsupported feature and we don't really have it.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list