[Python-3000] bug in i/o module buffering?

Bill Janssen janssen at parc.com
Sun Oct 28 02:11:06 CET 2007


In the following, 'n' is equal to 0 (read from a non-blocking socket).
Is this a bug in the I/O module buffering?

Bill

Traceback (most recent call last):
  File "/local/python/3k/src/Lib/SocketServer.py", line 222, in handle_request
    self.process_request(request, client_address)
  File "/local/python/3k/src/Lib/SocketServer.py", line 241, in process_request
    self.finish_request(request, client_address)
  File "/local/python/3k/src/Lib/SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/local/python/3k/src/Lib/SocketServer.py", line 522, in __init__
    self.handle()
  File "/local/python/3k/src/Lib/BaseHTTPServer.py", line 330, in handle
    self.handle_one_request()
  File "/local/python/3k/src/Lib/BaseHTTPServer.py", line 313, in handle_one_request
    self.raw_requestline = self.rfile.readline()
  File "/local/python/3k/src/Lib/io.py", line 391, in readline
    b = self.read(nreadahead())
  File "/local/python/3k/src/Lib/io.py", line 377, in nreadahead
    readahead = self.peek(1, unsafe=True)
  File "/local/python/3k/src/Lib/io.py", line 778, in peek
    current = self.raw.read(to_read)
  File "/local/python/3k/src/Lib/io.py", line 455, in read
    del b[n:]
TypeError: 'slice' object does not support item deletion
----------------------------------------



More information about the Python-3000 mailing list