Different behaviour of ctypes c_char_p?
问题 I am confused with this behaviour of different versions of python and dont understand why ? Python 2.7.5 (default, Aug 25 2013, 00:04:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> c="hello" >>> a=ctypes.c_char_p(c) >>> print(a.value) hello Python 3.3.5 (default, Mar 11 2014, 15:08:59) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin Type "help", "copyright", "credits" or "license"