Commit 3dece8e1 authored by Mikhail Korobov's avatar Mikhail Korobov

DOC initialize string with bytes

As-is the example doesn't compile.
parent 24eace85
......@@ -456,7 +456,7 @@ and then copies its buffer into a new C++ string.
For the other direction, efficient decoding support is available
in Cython 0.17 and later::
cdef string s = string('abcdefg')
cdef string s = string(b'abcdefg')
ustring1 = s.decode('UTF-8')
ustring2 = s[2:-2].decode('UTF-8')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment