[cse491] Trouble understanding __call__ usage

Rory hoolrory at msu.edu
Sun Nov 1 16:49:24 PST 2009


Titus,

I had the same question as Ryan, about wsgi_standards and I'm still confused
after your response.

Is it possible to return a callable object? So that we can return data?

When I try to I get the error:

	Traceback (most recent call last):
  		File "webserve.py", line 139, in <module>
    			httpd.serve_forever()
 		File "webserve.py", line 128, in serve_forever
    			close_flag, stuff = self.handle_connection(client)
  		File "webserve.py", line 103, in handle_connection
    			for string in self.app(environ, start_response):
	TypeError: default __new__ takes no parameters

Regards,
Rory




More information about the cse491-fall-2009 mailing list