[C++-sig] str, dict, tuple

David Abrahams david.abrahams at rcn.com
Thu Jul 18 18:01:57 CEST 2002


I have integrated Achim's str, dict, and tuple support into Boost.Python
v2. Thanks, Achim!

A few things had to change:

1. You were relying on implicit conversion from, e.g., object->list.
However, since list's templated constructor is explicit, that didn't
compile on many compilers.

2. Writing converter specializations for these types is much simpler now;
you just need to specialize object_manager_traits<>, so lots of code went
away.

3. return types of some str functions (encode, decode, count) were wrong.
It would be a good idea to enhance your regression tests so that they would
fail with the old code but succeed with the new code.

Regards,
Dave

+---------------------------------------------------------------+
                  David Abrahams
      C++ Booster (http://www.boost.org)               O__  ==
      Pythonista (http://www.python.org)              c/ /'_ ==
  resume: http://users.rcn.com/abrahams/resume.html  (*) \(*) ==
          email: david.abrahams at rcn.com
+---------------------------------------------------------------+






More information about the Cplusplus-sig mailing list