[Python-ideas] TextIOWrapper callable encoding parameter (original) (raw)
Victor Stinner victor.stinner at gmail.com
Wed Jun 13 00:13:50 CEST 2012
- Previous message: [Python-ideas] TextIOWrapper callable encoding parameter
- Next message: [Python-ideas] TextIOWrapper callable encoding parameter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2012/6/11 Nick Coghlan <ncoghlan at gmail.com>:
Immediate thought: it seems like it would be easier to offer a way to inject data back into a buffered IO object's internal buffer.
BufferedReader has already an useful peek() method to read data without changing the position. http://docs.python.org/library/io.html#io.BufferedReader.peek
It's not perfect ("The number of bytes returned may be less or more than requested.") but better than nothing.
Victor
- Previous message: [Python-ideas] TextIOWrapper callable encoding parameter
- Next message: [Python-ideas] TextIOWrapper callable encoding parameter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]