From: Giampaolo Rodola' Date: Thu, 3 Oct 2013 19:01:43 +0000 (+0200) Subject: Provide a more readable representation of socket on repr(). X-Git-Tag: v3.4.0b1~300^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b62814998ab0a1dd16830eaaa4e6e6d8618872e1;p=thirdparty%2FPython%2Fcpython.git Provide a more readable representation of socket on repr(). Before: Now: --- diff --git a/Lib/socket.py b/Lib/socket.py index 576ac5532f0c..6d67b3d2824b 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -136,7 +136,7 @@ class socket(_socket.socket): address(es). """ closed = getattr(self, '_closed', False) - s = "<%s.%s%s fd=%i, family=%i, type=%i, proto=%i" \ + s = "<%s.%s%s fd=%i, family=%s, type=%s, proto=%i" \ % (self.__class__.__module__, self.__class__.__name__, " [closed]" if closed else "",