Message344895
This behavior is pretty surprising:
```python
import ctypes
class Simple(ctypes.Structure):
_fields_ = [
('a', ctypes.c_uint8),
('b', ctypes.c_uint8),
]
class Bitfields(ctypes.Structure):
_fields_ = [
('a', ctypes.c_uint8, 8),
('b', ctypes.c_uint8, 8),
]
print(Simple.b.size) # 1
print(Bitfields.b.size) # 262148
```
The docstring for this field, from `help(type(Bitfields.b).size)`, is:
> Help on getset descriptor _ctypes.CField.size:
>
> size
> size in bytes of this field
So either the behavior or the docstring needs to change. |
|
Date |
User |
Action |
Args |
2019-06-07 03:46:36 | Eric Wieser | set | recipients:
+ Eric Wieser, docs@python |
2019-06-07 03:46:36 | Eric Wieser | set | messageid: <1559879196.85.0.0861364976154.issue37187@roundup.psfhosted.org> |
2019-06-07 03:46:36 | Eric Wieser | link | issue37187 messages |
2019-06-07 03:46:36 | Eric Wieser | create | |
|