Hacker News new | ask | show | jobs
by est 5440 days ago
I never understand the mentality of modern wsgi/cgi design. Passing parameters using environ? Why not directly as a python request object?
1 comments

For consistency. If there was a request object, there would need to be some sort of standard implementation that there was always access to so that the object could be properly instantiated, instance tested, etc. By using a plain old dict, you ensure compatibility at the cost of attribute access.

Also because WSGI is designed to be low-level, and if you want a request object you should really be using a library or framework.

But the old model sucks. If a process can handle more than one request, how does it change environ if there is only one process?