[Python-bugs-list] [Bug #110845] struct.pack not being very picky (PR#52)

noreply@sourceforge.net noreply@sourceforge.net
Fri, 25 Aug 2000 07:14:21 -0700


Bug #110845, was updated on 2000-Aug-01 14:15
Here is a current snapshot of the bug.

Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: struct.pack not being very picky (PR#52)

Details: Jitterbug-Id: 52
Submitted-By: da@ski.org
Date: Sun, 15 Aug 1999 17:52:20 -0400 (EDT)
Version: 1.5.2
OS: NT4SP3


>>> from struct import *
>>> struct.pack('B', -12)
'\364'

I expected a ValueError, the way:

>>> struct.pack('c', 123)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
struct.error: char format require string of length 1

works.




====================================================================
Audit trail:
Mon Aug 30 12:33:11 1999	guido	moved from incoming to request

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110845&group_id=5470