Object not being recognized as duck-typed function
In summary, one needs to give __call__ a default parameter, otherwise
the object is not recognized as a function when it is called and
throws an error. I guess I can work around by using a default of
None, but I can't believe this is desired behavior. (If you add a
default and reload, then take it away and reload, it works OK -- even
weirder.) I will file a bug report shortly, but if anyone cares to
comment, I would be interested.
Using Python 7, a recent cherrypy.
Here is some that shows the problem:
def index (self):
return "Hello World"
index.exposed = True