[docs] [issue37513] Fix a type error in ctypes.rst

hai shi report at bugs.python.org
Sat Jul 6 00:28:06 EDT 2019


New submission from hai shi <shihai1991 at 126.com>:

Python 3.9.0a0 (heads/master-dirty:80097e0, Jul  6 2019, 02:14:54)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> class POINT(Structure):
...     _fields_ = [("x", c_int),
...                 ("y", c_int)]
...
>>> POINT(1, 2, 3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: too many initializers

and the init function in:
https://github.com/python/cpython/blob/master/Modules/_ctypes/_ctypes.c#L4335

----------
assignee: docs at python
components: Documentation
messages: 347419
nosy: docs at python, shihai1991
priority: normal
severity: normal
status: open
title: Fix a type error in ctypes.rst

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37513>
_______________________________________


More information about the docs mailing list