Skip to content
Myr

Add __str__ to case insensitive dict. Logging headers for debugging purposes is often necessary, and the currently logging the headers would be using __repr__ which would log the implementation detail of headers, caseinsensitivedict. Adding str lends a more printing and log friendly implementation for case insentitice dict

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

authored by Avi Das · committed by Avi Das · parent 110048f · Browse files · 1 file+3 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+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:requests/structures.py+3 added
106 unmodified lines
107108 def __repr__(self):109 return '%s(%r)' % (self.__class__.__name__, dict(self.items()))110111 def __str__(self):112 return '%s' % (dict(self.items())113114115class LookupDict(dict):116 """Dictionary lookup object."""117118 def __init__(self, name=None):
13 unmodified lines