New submission from anatoly techtonik:

  "An optional sequence that lists the names of unnamed (anonymous) fields".

If you feed it a string, such as _offset, it will print a very interesting 

  File "C:\roundup\.\roundup\backends\", line 70, in <module>
    class A_OFFSET_UNION(Union):
AttributeError: type object '_OFFSET_UNION' has no attribute '_'

Considering complexity that ctypes already has, the simple check that 
_anonymous_ is a sequence (and not a string) will make our lifes easier.

components: ctypes
messages: 176494
nosy: techtonik
priority: normal
severity: normal
status: open
title: Structure._anonymous_ should not allow strings
versions: Python 2.7

Python tracker <>
Python-bugs-list mailing list

Reply via email to