[issue30504] Allow inspecting buffering attribute of IO objects

2017-05-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, I had forgotten about the `line_buffering` attribute. Thank you. -- ___ Python tracker ___

[issue30504] Allow inspecting buffering attribute of IO objects

2017-05-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> sys.stdout.line_buffering True For buffered streams I would expect the attribute named "buffer_size", conforming to the name of the parameter of the constructor. -- nosy: +serhiy.storchaka ___ Python tracker

[issue30504] Allow inspecting buffering attribute of IO objects

2017-05-29 Thread Antoine Pitrou
New submission from Antoine Pitrou: It would be useful to be able to inspect the buffering attribute of buffered and text I/O objects, especially for debugging. I would expect e.g.: >>> sys.stdout.buffering 1 # line-buffered >>> sys.stdout.buffer.buffering 8192 -- components: IO