Skip to content

Comment on Show HN: Pump, a dead simple Pythonic abstraction of HTTP.

Comments

I never understand the mentality of modern wsgi/cgi design. Passing parameters using environ? Why not directly as a python request object?

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?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.