[issue17440] Some IO related problems on x86 windows
Antoine Pitrou
report at bugs.python.org
Sun Mar 17 16:07:48 CET 2013
Antoine Pitrou added the comment:
Bytes objects are immutable, so trying to "copy" them doesn't copy anything actually (it's an optimization):
>>> b = b"x" *10
>>> id(b)
139720033059920
>>> b2 = b[:]
>>> id(b2)
139720033059920
FileIO.read() only calls the underlying read() once, you can check the implementation:
http://hg.python.org/cpython/file/8002f45377d4/Modules/_io/fileio.c#l703
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17440>
_______________________________________
More information about the Python-bugs-list
mailing list