1# mode: run
2# tag: cpp, werror, cpp11
3
4from libcpp.string cimport string
5
6b_asdf = b'asdf'
7
8def test_element_access(char *py_str):
9 """
10 >>> test_element_access(b_asdf)
11 ('a', 'f')
12 """
13 cdef string s
14 s = string(py_str)
15 return chr(s.front()), chr(s.back())
16