I like the ability to access elements of a struct such as with ctypes
Structure:
>>>myStruct.elementName1
4

What I like about it is there are no quotes needed.

What I don't like about it is that it's not iterable:
>>>for n in myStruct:  <== gives error
>>>    print n

I don't want to force the end user to have preknowledge of the element
names.
Has anyone subclassed ctypes Structure based class to be iterable?
Before a noob starts trying to do this, is it possible?  How to
approach it?

Thx,
Mark
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to