>>> f = open("py3k/__svn__/LICENSE") >>> f >>> f.buffer <_io.BufferedReader object at 0x7f4b67569f68> >>> f.buffer.raw io.FileIO(3, 'rb') >>> f.name 'py3k/__svn__/LICENSE' It would probably be nice if f.name were reused for f's repr().
2009/4/21 Antoine Pitrou <report@bugs.python.org>: > > Antoine Pitrou <pitrou@free.fr> added the comment: > > Benjamin, do you think it can still be added after beta1? > (I ask that in case noone does it before) Yes, I think that would be ok.
Antoine, by "reused for f's repr" do you mean adding 'name=xxxx' into the existing repr (probably before the encoding)? Benjamin, by "bytes" do you mean BytesIO objects? Would it be acceptible to give them a 'name' attribute set to 'None'?