Skip to content
Myr

better repr() support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 18db8b8 · Browse files · 1 file+13 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+13 added−0 removed

  • other:+13 added−0 removed

1 file+13 added−0 removed

modified:requests/core.py+13 added
60 unmodified lines
61 self.response = Response()62 self.auth = None63 self.sent = False64 65 def __repr__(self):66 try:67 repr = '<Request [%s]>' % (self.method)68 except:69 repr = '<Request object>'70 return repr71 72 def __setattr__(self, name, value):73 if (name == 'method') and (value):74 if not value in self._METHODS:
140 unmodified lines
215 def __init__(self):216 self.content = None217 self.status_code = None218 self.headers = dict()219 220 def __repr__(self):221 try:222 repr = '<Response [%s]>' % (self.status_code)223 except:224 repr = '<Response object>'225 return repr226227 228class AuthObject(object):229 """The :class:`AuthObject` is a simple HTTP Authentication token. When
176 unmodified lines