New submission from Nick <n...@codingrobot.com>:

the code I'm trying to execute (block is long enough):
unpack("2IB2I", block)

executing this raises an exception:
struct.error: unpack requires a bytes argument of length 20

Setting native byte-order with '@' causes the same error.
Specifying the correct byte-order either with '>' or '<', or
native with '=' helps and unpack expects the correct number (17) of bytes.

----------
components: Library (Lib)
messages: 100096
nosy: codingrobot
severity: normal
status: open
title: struct.unpack() expects wrong number of bytes
type: behavior
versions: Python 2.6, Python 3.1

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

Reply via email to