Message151931
| Author |
meador.inge |
| Recipients |
docs@python, georg.brandl, meador.inge, vpelletier |
| Date |
2012年01月25日.03:14:24 |
| SpamBayes Score |
6.1062266e-16 |
| Marked as misclassified |
No |
| Message-id |
<1327461266.32.0.943331805695.issue13840@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|
History
|
|---|
| 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 |
|