On 18.01.2017 23:04, 奇真亦假 wrote:
> It's strange that boost::python don't support boost::python::set.

Indeed, a wrapper type for that is missing. Feel free to submit a patch.

> Set is a very usable structure, so is there any idea about it? How to
> convert a python::set to a std::set or any other hash-able structure?

Converting python sets to C++ should be done by custom converters, as I
doubt there is  a single way to do it that would meet everyone's
requirement.

> Btw, how about boost::python::dict's performance? Does it implemented
> by hash-table?

All boost::python object types are thin wrappers around their Python
counterparts, i.e. a boost::python::dict simply wraps a Python dict.
See
http://boostorg.github.io/python/doc/html/tutorial/tutorial/object.html#tutorial.object.derived_object_types

        Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to