Message141757
Another possible improvement that can be done is providing a proper Response object instead of addbase, addinfo, addinfourl (yes, those are oddly-named classes, not functions [0]).
The Response object could be like 'addbase', but with this signature:
class Response:
def __init__(self, fp, headers=None, url=None, code=None):
...
and without additional getters.
The addclosehook class could be provided via an alternative constructor:
@classmethod
def with_close_hook(cls, fp, hook, *hookargs):
...
[0]: Lib/urllib/response.py |
|
Date |
User |
Action |
Args |
2011-08-08 00:26:11 | ezio.melotti | set | recipients:
+ ezio.melotti, orsenthil, sandro.tosi |
2011-08-08 00:26:11 | ezio.melotti | set | messageid: <1312763171.77.0.398168303762.issue12707@psf.upfronthosting.co.za> |
2011-08-08 00:26:11 | ezio.melotti | link | issue12707 messages |
2011-08-08 00:26:10 | ezio.melotti | create | |
|