This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Claudiu.Popa, serhiy.storchaka
Date 2014-07-26.11:49:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406375367.84.0.0659269818939.issue22078@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-07-26 11:49:27serhiy.storchakasetrecipients: + serhiy.storchaka, Claudiu.Popa
2014-07-26 11:49:27serhiy.storchakasetmessageid: <1406375367.84.0.0659269818939.issue22078@psf.upfronthosting.co.za>
2014-07-26 11:49:27serhiy.storchakalinkissue22078 messages
2014-07-26 11:49:27serhiy.storchakacreate