Mark Dickinson <dicki...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue32978>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to