Ezio Melotti <ezio.melo...@gmail.com> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12707>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to