Skip to content

Commit

Permalink
change TypeConfig.update to updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyroberts committed Sep 9, 2014
1 parent 77e0af3 commit 64d3a4d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jsonobject/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,14 @@ def replace(self, properties=None, string_conversions=None):
else self._string_conversions)
)

def update(self, properties=None, string_conversions=None):
def updated(self, properties=None, string_conversions=None):
"""
update properties and string_conversions with the paramenters
keeping all non-mentioned items the same as before
returns a new TypeConfig with these changes
(does not modify original)
"""
_properties = self._properties.copy()
_string_conversions = self.string_conversions[:]
if properties:
Expand Down Expand Up @@ -719,7 +726,7 @@ def __configure(cls, properties=None, string_conversions=None,
"{} {}".format(properties, update_properties)
type_config = super_settings.type_config
if update_properties is not None:
type_config = type_config.update(properties=update_properties)
type_config = type_config.updated(properties=update_properties)
elif properties is not None:
type_config = type_config.replace(properties=properties)
if string_conversions is not None:
Expand Down

0 comments on commit 64d3a4d

Please sign in to comment.