[ python-Bugs-924218 ] socket._fileobject._getclosed() returns wrong value

SourceForge.net noreply at sourceforge.net
Mon Mar 29 14:14:41 EST 2004


Bugs item #924218, was opened at 2004-03-26 13:33
Message generated for change (Comment added) made by gigamorph
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=924218&group_id=5470

Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: June Kim (gigamorph)
Assigned to: Nobody/Anonymous (nobody)
Summary: socket._fileobject._getclosed() returns wrong value

Initial Comment:
In socket.py, _getclosed() is defined as follows:

  class _fileobject(object)
      # ...
      def _getclosed(self):
          return self._sock is not None

Which causes the following interaction:
  >>> import socket
  >>> s = socket.socket()
  >>> f = s.makefile()
  >>> f.closed
  True
  >>> f.close()
  >>> f.closed
  False

Shouldn't the values of f.closed the opposite of the above?





----------------------------------------------------------------------

>Comment By: June Kim (gigamorph)
Date: 2004-03-29 11:14

Message:
Logged In: YES 
user_id=1007376

Duplicate, resolved in #924242.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=924218&group_id=5470



More information about the Python-bugs-list mailing list