Author serhiy.storchaka
Recipients drj, gpolo, serhiy.storchaka, terry.reedy
Date 2013-02-14.17:58:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Now, is there some problem if we remove the calls to the "tell" method
> in _write_header ? See patch attached (tests are very welcome too).

Yes, there is a problem. User can pass already open file to and file position can be not 0 at the start of the WAVE file. But you can do with only one tell(). Note a magic number 36 in many places of the code. This is struct.calcsize(wave_header_format).

Test is needed as well as a documentation change.

I think this is rather a new feature and should be added only in 3.4. Actually the current behavior is documented: "If *file* is a string, open the file by that name, otherwise treat it as a seekable file-like object."
Date User Action Args
2013-02-14 17:58:51serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, gpolo, drj
2013-02-14 17:58:51serhiy.storchakasetmessageid: <>
2013-02-14 17:58:51serhiy.storchakalinkissue5202 messages
2013-02-14 17:58:51serhiy.storchakacreate