Message151931
The 'create_unicode_buffer' docs are currently wrong too:
"""
If the first parameter is a bytes object, it is converted into an
unicode string according to ctypes conversion rules.
"""
>>> ctypes.create_unicode_buffer(b'foo')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/meadori/src/python/cpython/Lib/ctypes/__init__.py", line 294, in create_unicode_buffer
buf.value = init
TypeError: unicode string expected instead of bytes instance
The attached patch fixes the documentation and exception messages.
Although, it might be more friendly to implement things according to
the current docs (i.e. do the conversions). |
|
Date |
User |
Action |
Args |
2012-01-25 03:14:26 | meador.inge | set | recipients:
+ meador.inge, georg.brandl, docs@python, vpelletier |
2012-01-25 03:14:26 | meador.inge | set | messageid: <1327461266.32.0.943331805695.issue13840@psf.upfronthosting.co.za> |
2012-01-25 03:14:25 | meador.inge | link | issue13840 messages |
2012-01-25 03:14:25 | meador.inge | create | |
|