[Python-3000-checkins] r54401 - python/branches/p3yk/Lib/io.py
guido.van.rossum
python-3000-checkins at python.org
Thu Mar 15 19:59:36 CET 2007
Author: guido.van.rossum
Date: Thu Mar 15 19:59:31 2007
New Revision: 54401
Modified:
python/branches/p3yk/Lib/io.py
Log:
Add some XXX comments and fix BufferedReader signature.
Modified: python/branches/p3yk/Lib/io.py
==============================================================================
--- python/branches/p3yk/Lib/io.py (original)
+++ python/branches/p3yk/Lib/io.py Thu Mar 15 19:59:31 2007
@@ -4,6 +4,10 @@
reimplemented in C and the rest may be turned into a package.
See PEP XXX; for now: http://docs.google.com/Doc?id=dfksfvqd_1cn5g5m
+
+XXX need to default buffer size to 1 if isatty()
+XXX need to support 1 meaning line-buffered
+XXX change behavior of blocking I/O
"""
__author__ = ("Guido van Rossum <guido at python.org>, "
@@ -17,7 +21,7 @@
DEFAULT_BUFFER_SIZE = 8 * 1024 # bytes
DEFAULT_MAX_BUFFER_SIZE = 16 * 1024 # bytes
-EOF = b''
+EOF = b'' # XXX This is wrong because it's mutable
class BlockingIO(IOError):
@@ -376,7 +380,7 @@
Does not allow random access (seek, tell).
"""
- def __init__(self, raw):
+ def __init__(self, raw, unused_buffer_size=None):
"""Create a new buffered reader using the given readable raw IO object.
"""
assert raw.readable()
More information about the Python-3000-checkins
mailing list