[issue7426] StringIO and with statement

2009-12-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> fileinput, StringIO, and cStringIO do not support the with protocol ___ Python tracker

[issue7426] StringIO and with statement

2009-12-04 Thread Brian Curtin
Brian Curtin added the comment: #1286 looks related -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7426] StringIO and with statement

2009-12-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue7426] StringIO and with statement

2009-12-03 Thread Jean-Michel Fauth
New submission from Jean-Michel Fauth : When toying with the "with" statement, I fell on this: Python 2.6.4 >>> with open('abc.txt', 'r') as f: for line in f: print line.rstrip() abc def >>> >>> import StringIO >>> fo = StringIO.StringIO('abc\ndef\n') >>> fo.se