[issue1407] [performance] Too many closed() checkings
Amaury Forgeot d'Arc
report at bugs.python.org
Fri Jun 13 15:37:14 CEST 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
I reproduce almost the same output.
"function.closed" often come in pair, because TextIOWrapper.closed is a
property which delegates to self.buffer.closed
I think that the first check in TextIOWrapper.write() is not necessary:
self.buffer.write(b) will also check for "self.buffer.closed", and there
is not much code in-between. The only side-effect is the decoder state.
----------
nosy: +amaury.forgeotdarc
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1407>
_______________________________________
More information about the Python-bugs-list
mailing list