This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, orsenthil, sandro.tosi
Date 2011-08-08.00:26:10
SpamBayes Score 0.014912483
Marked as misclassified No
Message-id <1312763171.77.0.398168303762.issue12707@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-08-08 00:26:11ezio.melottisetrecipients: + ezio.melotti, orsenthil, sandro.tosi
2011-08-08 00:26:11ezio.melottisetmessageid: <1312763171.77.0.398168303762.issue12707@psf.upfronthosting.co.za>
2011-08-08 00:26:11ezio.melottilinkissue12707 messages
2011-08-08 00:26:10ezio.melotticreate