3 ms·
I never understand the mentality of modern wsgi/cgi design. Passing parameters using environ? Why not directly as a python request object?
by est 15y ago
I never understand the mentality of modern wsgi/cgi design. Passing parameters using environ? Why not directly as a python request object?
- LeafStorm 15y agoFor 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.
- est 15y agoBut the old model sucks. If a process can handle more than one request, how does it change environ if there is only one process?