| Store | Cart

Re: [C++-sig] Is there anybody has idea about access the set from python?

From: Stefan Seefeld <ste...@seefeld.name>
Thu, 19 Jan 2017 15:23:45 -0500
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
Cplu...@python.org
https://mail.python.org/mailman/listinfo/cplusplus-sig
Recent Messages in this Thread
奇真亦假 Jan 19, 2017 04:04 am
Stefan Seefeld Jan 19, 2017 08:23 pm
奇真亦假 Jan 20, 2017 12:48 am
Stefan Seefeld Jan 20, 2017 03:32 pm
Messages in this thread