diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-05-28 19:10:49 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-28 19:10:49 -0700 |
commit | b70663f434897c3830ac0ca4c972face484ce064 (patch) | |
tree | df6f160f36564fb598100339882d89d635c70c09 | |
parent | 7971dce2231bc32c25b962d425d8ad935568a699 (diff) | |
download | mitmproxy-b70663f434897c3830ac0ca4c972face484ce064.tar.gz mitmproxy-b70663f434897c3830ac0ca4c972face484ce064.tar.bz2 mitmproxy-b70663f434897c3830ac0ca4c972face484ce064.zip |
minor improvements
-rw-r--r-- | netlib/multidict.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/netlib/multidict.py b/netlib/multidict.py index da482620..98fde7e3 100644 --- a/netlib/multidict.py +++ b/netlib/multidict.py @@ -16,7 +16,7 @@ from .utils import Serializable @six.add_metaclass(ABCMeta) class _MultiDict(MutableMapping, Serializable): def __repr__(self): - fields = tuple( + fields = ( repr(field) for field in self.fields ) @@ -206,14 +206,14 @@ class _MultiDict(MutableMapping, Serializable): @classmethod def from_state(cls, state): - return cls(tuple(x) for x in state) + return cls(state) class MultiDict(_MultiDict): - def __init__(self, fields=None): + def __init__(self, fields=()): super(MultiDict, self).__init__() self.fields = tuple( - [tuple(i) for i in fields or ()] + tuple(i) for i in fields ) |