Mike Orr wrote:
> It would certainly answer the question of whether Pylons should add
> res.content_type and res.charset properties.

One inconsistency right now between Request and Response is that 
Response separates content_type and charset, and they go together in 
Request (e.g., request.content_type can be 'text/html; charset=utf8'). 
Of course, very few clients send parameters with request body content 
types,

> req.body = 'test' seems a bit magical for what's ostensibly a readonly
> file object..  How about req.set_body('test')?

It's really quite writable; almost all the attributes are writable.

Admittedly req.body = 'test' is something I felt a bit odd about.  At 
first you could only assign a file-like object.  In the tests I did 
enough assignment like req.body = StringIO('test'), that I felt like 
creating a shortcut.  But it's possible since it isn't symmetric (you 
put a string in and get a file-like object out) that a method would be 
better.

> NestedMultiDict is not explained, though I see in the source it's a
> cascading tuple of dicts.

MultiDict and company are all the same as in Paste currently.



-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
             : Write code, do good : http://topp.openplans.org/careers

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to