Changes between Initial Version and Version 4 of Ticket #16398


Ignore:
Timestamp:
Jul 4, 2011, 11:49:31 AM (13 years ago)
Author:
Luke Plant
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16398

    • Property Has patch set
  • Ticket #16398 – Description

    initial v4  
    11My use case:
    2 
     2{{{
     3#!python
    34# Current procedure
    45def myview(req):
     
    1213    return resp.write(json.dumps({'msg': 'Hello World!'}))
    1314
    14 HttpResponse.write() returns None initially. It would be really nice if .write() would return self so I can return an HttpResponse object. Instead I have to take up an extra line of code (and in my application, that is a lot when duplicated).
     15}}}
     16`HttpResponse.write()` returns None initially. It would be really nice if .write() would return self so I can return an `HttpResponse` object. Instead I have to take up an extra line of code (and in my application, that is a lot when duplicated).
    1517
    16 An extension on this request could be that all public methods on HttpResponse should return self.
     18An extension on this request could be that all public methods on `HttpResponse` should return self.
Back to Top