logo       

Re: list.len(): msg#00287

python.c++

Subject: Re: list.len()

"Ralf W. Grosse-Kunstleve" <rwgk@xxxxxxxxx> writes:

> --- David Abrahams <dave@xxxxxxxxxxxxxxxxxxxx> 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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise