Q:

Data attribute overrides base class method: Python

I have a class named SearchQuery and I named a data attribute as query (type: String); but the base class has a class method query(). So my SearchQuery class is as follow:
class SearchQuery(ndb.Model):
    query = ndb.StringProperty()

Now when I write:
SearchQuery.query()

I get:
TypeError: 'StringProperty' object is not callable

How do I call the query method? I will change my data member name but before changing I have to copy the data. For copying, query() has to be called.

A:

You don't need to call it at all; SearchQuery.query() is equal to ndb.Query(kind="SearchQuery")

