title: What's wrong with this cassandra prepared statement call?
body: <p>I'm using the datastax cassandra driver for python.</p>
  
  <p>The portion of the code at issue is:</p>
  
  <pre><code>cql = "SELECT * FROM iptools.geo2ip WHERE geo_key = ? AND (( geohash &gt;= ? AND geohash &lt; ? ) OR ( geohash &gt;= ? AND geohash &lt; ? ));"
  print cql
  prepared = self.session.prepare(cql)
  </code></pre>
  
  <p>Results are:</p>
  
  <pre><code>SELECT * FROM iptools.geo2ip WHERE geo_key = ? AND (( geohash &gt;= ? AND geohash &lt; ? ) OR ( geohash &gt;= ? AND geohash &lt; ? ));
  cassandra.protocol.SyntaxException: &lt;ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:82 missing EOF at ')' (...? AND geohash &lt; ? [)];)"&gt;
  </code></pre>
  
  <p>I'm not sure where the brackets around the parenthesis are coming from, and the prepare statement works as soon as I remove the parenthesis.</p>
  
  <p>Ideas?</p>