From b62814998ab0a1dd16830eaaa4e6e6d8618872e1 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola' Date: Thu, 3 Oct 2013 21:01:43 +0200 Subject: Provide a more readable representation of socket on repr(). Before: Now: --- Lib/socket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/socket.py b/Lib/socket.py index 576ac55..6d67b3d 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 "", -- cgit v0.12