Class related error in python : level BASIC
<pre><code>from __future__ import print_function
import pysolr

class SolrFunc:
    def __init__(self,urlx,timex=60):
        self.url=urlx
        self.timer = timex

    def filter_add(self,fill):
        self.filterx = []
        self.filterx.append(fill)

    def filter_adds(self,fills):
        self.filtery= []
        x = fills.split(',')
        for i in x:         
            self.filtery.append(i)

    def query(self):
        solr = pysolr.Solr(self.url,self.timex)
        solr.optimize()
        results = solr.search('*:*',fq = self.filtery)
        for result in results:
            print(result['raw_location']

urly = "http://url/solr/"
testr = SolrFunc(urly,10)
testr.filter_adds('gender:male','country_code:in')
tester.query()
</code></pre>

<p>In the above code I am getting : </p>

<pre><code>  File "xyz.py", line 26
    urly = "http://url/solr/"
   ^
</code></pre>

<p>SyntaxError: invalid syntax</p>

<p>Is there problem in class declaration or something else , because url is supposed to be string and works fine when I do urllib.urlopen.read()</p>
