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 LambertDW
Recipients LambertDW, MLModel, georg.brandl, loewis, rhettinger
Date 2009-03-19.15:36:51
SpamBayes Score 0.0016364352
Marked as misclassified No
Message-id <1237477013.22.0.747869782517.issue5513@psf.upfronthosting.co.za>
In-reply-to
Content
#OOPS!  I forgot the subtlety.
#I must also retain the stream
#else it gets collected.
#Nasty.


import io

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)
History
Date User Action Args
2009-03-19 15:36:53LambertDWsetrecipients: + LambertDW, loewis, georg.brandl, rhettinger, MLModel
2009-03-19 15:36:53LambertDWsetmessageid: <1237477013.22.0.747869782517.issue5513@psf.upfronthosting.co.za>
2009-03-19 15:36:51LambertDWlinkissue5513 messages
2009-03-19 15:36:51LambertDWcreate