title: AttributeError: 'socket' object attribute 'send' is read-only
body: <p>I started reading the book &quot;Black hat python&quot; and upon writing the very 1st TCP client example I get the error</p>
  <pre><code>AttributeError: 'socket' object attribute 'send' is read-only
  </code></pre>
  <p>The  code is as follows:</p>
  <pre><code>import socket
  
  target_host = &quot;google.com&quot;
  
  target_port = 80
  
  client = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  
  client.connect((target_host,target_port))
  
  
  client.send = (&quot;GET / HTTP/1.1\r\nHost: google.com\r\n\r\n&quot;)
  
  response = client.recv(4096)
  </code></pre>
  <p>print response</p>
  <p>Where could the mistake be?</p>