diff -r 322ee2f2e922 Lib/pydoc.py --- a/Lib/pydoc.py Mon Sep 15 23:55:16 2014 +1200 +++ b/Lib/pydoc.py Mon Sep 15 15:12:14 2014 -0400 @@ -2176,8 +2176,10 @@ class DocServer(http.server.HTTPServer): def __init__(self, port, callback): - self.host = (sys.platform == 'mac') and '127.0.0.1' or 'localhost' - self.address = ('', port) + self.host = 'localhost' + if sys.platform in ('mac', 'linux'): + self.host = '127.0.0.1' + self.address = (self.host, port) self.callback = callback self.base.__init__(self, self.address, self.handler) self.quit = False