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

@@ -26,8 +26,13 @@ void work_with_string(object print)
print(data.capitalize());
print('[' + data.center(30) + ']');
print(data.count("t"));
#if PY_VERSION_HEX < 0x03000000
print(data.encode("utf-8"));
print(data.decode("utf-8"));
#else
print(data.encode("utf-8").attr("decode")("utf-8"));
print(data.encode("utf-8").attr("decode")("utf-8"));
#endif
BOOST_ASSERT(!data.endswith("xx"));
BOOST_ASSERT(!data.startswith("test"));