homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect error message for conflicting initializers of ctypes structure
Type: behavior Stage: resolved
Components: ctypes, Library (Lib) Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, belopolsky, meador.inge, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016年06月17日 08:35 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ctypes_conflictin_initializers_error_message.patch serhiy.storchaka, 2016年06月17日 10:24
Messages (2)
msg268713 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016年06月17日 08:35
>>> from ctypes import *
>>> class POINT(Structure):
... _fields_ = [("x", c_int), ("y", c_int)]
... 
>>> POINT(2, 3, x=4)
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
TypeError: duplicate values for field '???'
The name of conflicting field is not output correctly because it is expected to be bytes.
Proposed patch makes the error message always contain the name of conflicting field.
msg268772 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016年06月18日 06:59
New changeset ed81fc7e285b by Serhiy Storchaka in branch '3.5':
Issue #27343: Fixed error message for conflicting initializers of ctypes.Structure.
https://hg.python.org/cpython/rev/ed81fc7e285b
New changeset 40e3790c2a00 by Serhiy Storchaka in branch 'default':
Issue #27343: Fixed error message for conflicting initializers of ctypes.Structure.
https://hg.python.org/cpython/rev/40e3790c2a00 
History
Date User Action Args
2022年04月11日 14:58:32adminsetgithub: 71530
2016年06月18日 07:00:07serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016年06月18日 06:59:20python-devsetnosy: + python-dev
messages: + msg268772
2016年06月17日 10:24:52serhiy.storchakasetfiles: + ctypes_conflictin_initializers_error_message.patch
2016年06月17日 10:23:33serhiy.storchakasetfiles: - ctypes_conflictin_initializers_error_message.patch
2016年06月17日 09:26:16berker.peksagsetstage: patch review -> commit review
2016年06月17日 08:35:06serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /