title: Why specify a host when creating a socket server in Python?
body: <p>When setting up a server socket in Python, the <code>socket.bind(address)</code> method allows you to specify the address as a tuple like <code>(host, port)</code>. However, <a href="https://docs.python.org/2/library/socket.html#example" rel="nofollow">the first example</a> shows that you can specify the host as <code>''</code> as a shortcut to mean all interfaces (IPv4).</p>
  
  <p>I can see how it could be useful to limit which interfaces a server socket listens on for the purposes of security. However, is there any other reason why you'd want to specify a host/IP address?</p>
  
  <p>The reason for me asking is that I maintain a debugger interface written in Python. Someone has asked me why I don't just use <code>''</code> as the host, so that remote clients can connect without any config change. This doesn't feel right somehow, but felt like a more technical explanation would be necessary!</p>
  
  <p>Thanks in advance.</p>