Skip to content

Commit

Permalink
review cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
annatisch committed May 17, 2016
1 parent 88438df commit 24cd72e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ClientRuntimes/Python/msrest/msrest/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class Serializer(object):
}
flattten = re.compile(r"(?<!\\)\.")

def __init__(self, classes={}):
def __init__(self, classes=None):
self.serialize_type = {
'iso-8601': Serializer.serialize_iso,
'rfc-1123': Serializer.serialize_rfc,
Expand All @@ -209,7 +209,7 @@ def __init__(self, classes={}):
'[]': self.serialize_iter,
'{}': self.serialize_dict
}
self.dependencies = dict(classes)
self.dependencies = dict(classes) if classes else {}

def _serialize(self, target_obj, data_type=None, **kwargs):
"""Serialize data into a string according to type.
Expand Down Expand Up @@ -665,7 +665,7 @@ class Deserializer(object):
'\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?')
flatten = re.compile(r"(?<!\\)\.")

def __init__(self, classes={}):
def __init__(self, classes=None):
self.deserialize_type = {
'iso-8601': Deserializer.deserialize_iso,
'rfc-1123': Deserializer.deserialize_rfc,
Expand All @@ -679,7 +679,7 @@ def __init__(self, classes={}):
'[]': self.deserialize_iter,
'{}': self.deserialize_dict
}
self.dependencies = dict(classes)
self.dependencies = dict(classes) if classes else {}

def __call__(self, target_obj, response_data):
"""Call the deserializer to process a REST response.
Expand Down

0 comments on commit 24cd72e

Please sign in to comment.