You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to use Sndfile like this:
fromscikits.audiolabimportSndfilewithSndfile("test.wav") asf:
# do something with fprint(f)
# no need to call f.close()!
Of course, contextlib.closing could be used for that, but why not support the with statement directly?
And, if I'm not mistaken, implementing this would be straightforward, just include the following within the class definition of Sndfile:
It would be nice to be able to use
Sndfile
like this:Of course,
contextlib.closing
could be used for that, but why not support thewith
statement directly?And, if I'm not mistaken, implementing this would be straightforward, just include the following within the class definition of
Sndfile
:The text was updated successfully, but these errors were encountered: