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 isoschiz, mark.dickinson, meador.inge, pitrou, serhiy.storchaka, skrah
Date 2013-04-20.21:45:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366494325.28.0.316789385437.issue17804@psf.upfronthosting.co.za>
In-reply-to
Content
Perhaps we need not iter_unpack(), but a grouper (some sort of)?

def grouper(seq, size):
    for i in range(0, len(seq), size):
        yield seq[i: i + size]

unpack = struct.Struct('!I').unpack
for chunk in grouper(data, 4):
    word, = unpack(chunk)
    ...
History
Date User Action Args
2013-04-20 21:45:25serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, pitrou, skrah, meador.inge, isoschiz
2013-04-20 21:45:25serhiy.storchakasetmessageid: <1366494325.28.0.316789385437.issue17804@psf.upfronthosting.co.za>
2013-04-20 21:45:25serhiy.storchakalinkissue17804 messages
2013-04-20 21:45:25serhiy.storchakacreate