2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

str, dict, and tuple!

[SVN r14517]
This commit is contained in:
Dave Abrahams
2002-07-18 15:17:08 +00:00
parent 94edc13393
commit dfd85da9d7
18 changed files with 1419 additions and 537 deletions

23
test/tuple.cpp Normal file
View File

@@ -0,0 +1,23 @@
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
#include <boost/python/tuple.hpp>
using namespace boost::python;
object convert_to_tuple(object data)
{
return tuple(data);
}
void test_operators(tuple t1, tuple t2, object print)
{
print(t1 + t2);
}
BOOST_PYTHON_MODULE_INIT(tuple_ext)
{
module("tuple_ext")
.def("convert_to_tuple",convert_to_tuple)
.def("test_operators",test_operators)
;
}