Message224046
This example is not correct.
1) Argument of BufferedReader should be binary stream.
>>> import io, gc
>>> f = open('/dev/null')
>>> bufio = io.BufferedReader(f)
>>> bufio.read(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '_io.TextIOWrapper' object has no attribute 'readinto'
2) gc.collect() doesn't collect file streams because references to them are saved in local variables. |
|
Date |
User |
Action |
Args |
2014-07-26 11:49:27 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Claudiu.Popa |
2014-07-26 11:49:27 | serhiy.storchaka | set | messageid: <1406375367.84.0.0659269818939.issue22078@psf.upfronthosting.co.za> |
2014-07-26 11:49:27 | serhiy.storchaka | link | issue22078 messages |
2014-07-26 11:49:27 | serhiy.storchaka | create | |
|