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 loewis
Recipients LambertDW, MLModel, georg.brandl, loewis, rhettinger
Date 2009-03-19.22:48:00
SpamBayes Score 3.756591e-05
Marked as misclassified No
Message-id <49C2CB9D.3060701@v.loewis.de>
In-reply-to <1237477013.22.0.747869782517.issue5513@psf.upfronthosting.co.za>
Content
> class file(io.TextIOWrapper):
> 
>     '''condensing code for this list without test is a no no!'''
> 
>     def __init__(self,name):
>         self.stream = open(name)   # SAVE THE STREAM!
>         super().__init__(self.stream.buffer)

I don't know what this is supposed to achieve, but it looks incorrect.
I would write it as

py> class file(io.TextIOWrapper):
...   def __init__(self, name):
...     super().__init__(io.BufferedReader(io.FileIO(name, "r")))
...

Your version creates a separate TextIOWrapper for no apparent reason.
History
Date User Action Args
2009-03-19 22:51:10loewissetrecipients: + loewis, georg.brandl, rhettinger, LambertDW, MLModel
2009-03-19 22:48:00loewislinkissue5513 messages
2009-03-19 22:48:00loewiscreate