From: Kenneth Reitz Date: Wed, 17 Aug 2011 02:20:26 +0000 (-0400) Subject: doctoring for Session X-Git-Tag: v0.6.0~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efba606e574707968ec2b35985b8cbb78213cb71;p=services%2Fpython-requests.git doctoring for Session --- diff --git a/requests/sessions.py b/requests/sessions.py index f8a6883..6681e3c 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -13,8 +13,11 @@ import requests.api import cookielib class Session(object): + """A Requests session.""" + __attrs__ = ['headers', 'cookies', 'auth', 'timeout', 'proxies'] + def __init__(self, **kwargs): # Set up a CookieJar to be used by default @@ -27,9 +30,11 @@ class Session(object): # Map and wrap requests.api methods self._map_api_methods() + def __repr__(self): return '' % (id(self)) + def _map_api_methods(self): """Reads each available method from requests.api and decorates them with a wrapper, which inserts any instance-local attributes