Terry J. Reedy added the comment:

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?)

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17804>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to