mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Fix a ctypes test.
This commit is contained in:
parent
b0f48abd87
commit
1f498ef63d
1 changed files with 4 additions and 4 deletions
|
@ -22,9 +22,9 @@ assigned from Python must be kept.
|
||||||
|
|
||||||
>>> array[4] = 'foo bar'
|
>>> array[4] = 'foo bar'
|
||||||
>>> array._objects
|
>>> array._objects
|
||||||
{'4': 'foo bar'}
|
{s'4': b'foo bar'}
|
||||||
>>> array[4]
|
>>> array[4]
|
||||||
'foo bar'
|
s'foo bar'
|
||||||
>>>
|
>>>
|
||||||
|
|
||||||
It gets more complicated when the ctypes instance itself is contained
|
It gets more complicated when the ctypes instance itself is contained
|
||||||
|
@ -47,9 +47,9 @@ of 'x' ('_b_base_' is either None, or the root object owning the memory block):
|
||||||
|
|
||||||
>>> x.array[0] = 'spam spam spam'
|
>>> x.array[0] = 'spam spam spam'
|
||||||
>>> x._objects
|
>>> x._objects
|
||||||
{'0:2': 'spam spam spam'}
|
{s'0:2': b'spam spam spam'}
|
||||||
>>> x.array._b_base_._objects
|
>>> x.array._b_base_._objects
|
||||||
{'0:2': 'spam spam spam'}
|
{s'0:2': b'spam spam spam'}
|
||||||
>>>
|
>>>
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue