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.

Author serhiy.storchaka
Recipients amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka
Date 2016-06-17.08:35:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466152506.85.0.761729161431.issue27343@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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.
History
Date User Action Args
2016-06-17 08:35:06serhiy.storchakasetrecipients: + serhiy.storchaka, amaury.forgeotdarc, belopolsky, meador.inge
2016-06-17 08:35:06serhiy.storchakasetmessageid: <1466152506.85.0.761729161431.issue27343@psf.upfronthosting.co.za>
2016-06-17 08:35:06serhiy.storchakalinkissue27343 messages
2016-06-17 08:35:06serhiy.storchakacreate