title: Python sendto() not working on 3.1 (works on 2.6)
body: <p>For some reason, the following seems to work perfectly on my ubuntu machine running python 2.6 and returns an error on my windows xp box running python 3.1</p>
  
  <pre><code>from socket import socket, AF_INET, SOCK_DGRAM
  data = 'UDP Test Data'
  port = 12345
  hostname = '192.168.0.1'
  udp = socket(AF_INET,SOCK_DGRAM)
  udp.sendto(data, (hostname, port))
  </code></pre>
  
  <p>Below is the error that the python 3.1 throws:</p>
  
  <pre><code>Traceback (most recent call last):
    File "sendto.py", line 6, in &lt;module&gt;
      udp.sendto(data, (hostname, port))
  TypeError: sendto() takes exactly 3 arguments (2 given)
  </code></pre>
  
  <p>I have consulted the documentation for python 3.1 and the sendto() only requires two parameters. Any ideas as to what may be causing this?</p>