summaryrefslogtreecommitdiff
path: root/frozendict/__init__.py
diff options
context:
space:
mode:
authorSantiago Lezica <slezica89@gmail.com>2014-02-23 12:30:40 -0200
committerSantiago Lezica <slezica89@gmail.com>2014-02-23 12:30:40 -0200
commitb27053e4d11f5891319fd29eda561c130ba3112a (patch)
tree23213f30824662f13c84c2261fe87939a3951183 /frozendict/__init__.py
parenta9f23e0c73819ef3433538c6bd820097a5b25e9b (diff)
Update __init__.py
Diffstat (limited to 'frozendict/__init__.py')
-rw-r--r--frozendict/__init__.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/frozendict/__init__.py b/frozendict/__init__.py
index 627bc0c..5a1ee92 100644
--- a/frozendict/__init__.py
+++ b/frozendict/__init__.py
@@ -10,9 +10,7 @@ class frozendict(collections.Mapping):
return self.__dict[key]
def copy(self, **add_or_replace):
- new = frozendict(self)
- new.__dict.update(add_or_replace) # Feels like cheating
- return new
+ return frozendict(self, **add_or_replace)
def __iter__(self):
return iter(self.__dict)