diff options
author | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:41:34 -0700 |
---|---|---|
committer | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:41:34 -0700 |
commit | 2c79b40c98c83e352c5479223d581d69b0e7806c (patch) | |
tree | 81c85525061fbc4805ff2ec2280f560956c35d64 /requests/structures.py | |
parent | d075cc8a1294c77c994dc5fd220ecb163ed31b93 (diff) | |
download | python-requests-2c79b40c98c83e352c5479223d581d69b0e7806c.tar python-requests-2c79b40c98c83e352c5479223d581d69b0e7806c.tar.gz |
Imported Upstream version 2.4.3
Diffstat (limited to 'requests/structures.py')
-rw-r--r-- | requests/structures.py | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/requests/structures.py b/requests/structures.py index 9fd7818..3e5f2fa 100644 --- a/requests/structures.py +++ b/requests/structures.py @@ -8,30 +8,7 @@ Data structures that power Requests. """ -import os import collections -from itertools import islice - - -class IteratorProxy(object): - """docstring for IteratorProxy""" - def __init__(self, i): - self.i = i - # self.i = chain.from_iterable(i) - - def __iter__(self): - return self.i - - def __len__(self): - if hasattr(self.i, '__len__'): - return len(self.i) - if hasattr(self.i, 'len'): - return self.i.len - if hasattr(self.i, 'fileno'): - return os.fstat(self.i.fileno()).st_size - - def read(self, n): - return "".join(islice(self.i, None, n)) class CaseInsensitiveDict(collections.MutableMapping): @@ -46,7 +23,7 @@ class CaseInsensitiveDict(collections.MutableMapping): case of the last key to be set, and ``iter(instance)``, ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()`` will contain case-sensitive keys. However, querying and contains - testing is case insensitive: + testing is case insensitive:: cid = CaseInsensitiveDict() cid['Accept'] = 'application/json' |