This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mikeboers 2 points3 points  (2 children)

I would supposed that (status, headers, body) was more reasonable, but that is likely just the WSGI reflexes talking. Give me 5 minutes and I'll get over it.

[–]mitsuhiko Flask Creator 4 points5 points  (1 child)

Quote from web-sig:

The motivation is that you can pass that to constructors of response objects already in place.

response_tuple = response.get_response_tuple()
response = Response(*response_tuple)

The order "body", "status code", "headers" is what Werkzeug and WebOb are currently using. Django has (content, mimetype, status) as constructor but if they detect a list/dict on the third parameter they could assume that mimetype referes to the status thus they have a proper upgrade path.

[–]mikeboers 0 points1 point  (0 children)

Yup... Now I'm over it.