[ python-Bugs-1620945 ] minor inconsistency in socket.close

SourceForge.net noreply at sourceforge.net
Fri Dec 22 19:05:03 CET 2006


Bugs item #1620945, was opened at 2006-12-22 18:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1620945&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jonathan Ellis (ellisj)
Assigned to: Nobody/Anonymous (nobody)
Summary: minor inconsistency in socket.close

Initial Comment:
In python 2.5 socket.close, all methods are delegated to _dummy, which raises an error.  It would be more consistent to delegate each method to its counterpart in _closedsocket; in particular re-closing a closed socket is not intended to raise:

    def close(self):
        self._sock.close()
        self._sock = _closedsocket()
        for method in _delegate_methods:
            setattr(self, method, getattr(self._sock, method))


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

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


More information about the Python-bugs-list mailing list