• R David Murray's avatar
    #17616: Improve context manager tests, fix bugs in close method and mode docs. · 536ffe16
    R David Murray yazdı
    'mode' docs fix: the file must always be opened in binary in Python3.
    
    Bug in Wave_write.close: when the close method calls the check that the header
    exists and it raises an error, the _file attribute never gets set to None, so
    the next close tries to close the file again and we get an ignored traceback
    in the __del__ method.  The fix is to set _file to None in a finally clause.
    This represents a behavior change...in theory a program could be checking for
    the error on close and then doing a recovery action on the still open file and
    closing it again.  But this change will only go into 3.4, so I think that
    behavior change is acceptable given that it would be pretty weird and unlikely
    logic to begin with.
    536ffe16
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...