New submission from Bart Robinson :
When a ZipFile object is created with mode='a', the existing file contents are
checked for the magic number b"PK\005\006" near the end of the file. If a
non-zipfile just happens to contain this magic number, it can confuse the
libra
Bart Robinson added the comment:
Six years later, I have accepted Amaury's challenge and created an extension
module that uses the double-conversion library to generate repr's for floats:
https://pypi.python.org/pypi/frepr
My rudimentary performance testing gives something like