[issue32978] Issues with reading large float values in AIFC files
Mark Dickinson
report at bugs.python.org
Fri Mar 2 12:21:53 EST 2018
Mark Dickinson <dickinsm at gmail.com> added the comment:
> If left the OverflowError propagated I would catch it at the caller place (_read_float() is used only once) and reraise as aifc.Error.
Ah, if there's a dedicated exception type already then yes, agreed that raising aifc.Error (with a suitable message) makes much more sense than raising an OverflowError or a ValueError.
> if there are files with an exponent of 0x7fff in wild
I hope there aren't, and I'd consider any such file to be broken/corrupted. That is, unless there's a common practice of using NaNs or infinities for the frame rate. I suppose it's conceivable that people us this as a placeholder meaning "I don't know the sample rate". No idea whether that's true in practice: I'm not a frequent user of this format.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32978>
_______________________________________
More information about the Python-bugs-list
mailing list