[Python-Dev] struct module: add OverflowErrors now?
Armin Rigo
arigo at tunes.org
Fri Nov 12 14:12:36 CET 2004
Hi,
The struct module is too lazy in checking for overflows (it only checks some
cases on some architectures). See patch #1038854. The question is: can we
make it strict this late in the 2.4 release process? This *will* break some
user code; the proof is that it breaks some standard library code, e.g.
gzip.py, which uses a signed typecode when it really means an unsigned one.
Fixing it in 2.4 would be nice, but on the other hand we could postpone it for
the 2.5 trunk; people trying 2.5 early will see the problem quickly. We could
add warnings for 2.4 but that looks overkill. Or we could just go ahead and
break existing buggy code with 2.4b3. Opinions?
Armin
More information about the Python-Dev
mailing list