Author terry.reedy
Recipients isoschiz, mark.dickinson, meador.inge, pconnell, pitrou, rhettinger, serhiy.storchaka, skrah, terry.reedy
Date 2013-04-26.21:03:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367010187.9.0.133132925531.issue17804@psf.upfronthosting.co.za>
In-reply-to
Content
I think 'iter_unpack' is deceptive and wrong for the following reason. Up to now, 'ixyz' or 'iterxyz' or 'iter_xyz' has meant a version of 'xyz' that presents items one at a time rather than all at once in a collection object (usually in a list). Unpack returns a tuple, but the new function would *not* present the members of the tuple one at time. Instead, it would apply unpack multiple times, yielding multiple tuples. I would call the new thing 'unpack_all' or 'unpacker' (the latter works especially well for an iterator class). An unpacker is a person or machine that repeatedly unpacks. (I was once a bottle unpacker for a college summer job ;-).

struct.unpacker(fmt, buffer)
    Return an iterator that repeatedly unpacks successive buffer slices of size calcsize(fmt) into tuples according to the format string fmt. The buffer length must be an exact multiple of calcsize(fmt)). (? Not clear from text description. Add param to allow remainder?)
History
Date User Action Args
2013-04-26 21:03:08terry.reedysetrecipients: + terry.reedy, rhettinger, mark.dickinson, pitrou, skrah, meador.inge, serhiy.storchaka, pconnell, isoschiz
2013-04-26 21:03:07terry.reedysetmessageid: <1367010187.9.0.133132925531.issue17804@psf.upfronthosting.co.za>
2013-04-26 21:03:07terry.reedylinkissue17804 messages
2013-04-26 21:03:07terry.reedycreate