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

Merged 2009 GSoC work from sandbox-branches/bhy/py3k branch back into trunk.

[SVN r56305]
This commit is contained in:
Stefan Seefeld
2009-09-19 02:32:41 +00:00
parent e3f6f01588
commit ef2a02c396
52 changed files with 734 additions and 245 deletions

View File

@@ -7,6 +7,8 @@
#include <boost/python/def.hpp>
#include <boost/python/class.hpp>
#include <boost/python/list.hpp>
#include <boost/python/tuple.hpp>
#include <boost/python/dict.hpp>
#include <boost/python/make_function.hpp>
#include <boost/lexical_cast.hpp>
#define BOOST_ENABLE_ASSERT_HANDLER
@@ -109,11 +111,16 @@ void exercise(list x, object y, object print)
print("sorted:");
x.pop(2); // make sorting predictable
x.pop(2); // remove [1,2] so the list is sortable in py3k
x.sort();
print(x);
print("reverse sorted:");
#if PY_VERSION_HEX >= 0x03000000
x.sort(*tuple(), **dict(make_tuple(make_tuple("reverse", true))));
#else
x.sort(&notcmp);
#endif
print(x);
list w;