Commit 211f6788 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Include `value_type` parameter in PropertyMap.copy()

parent 505e795f
......@@ -425,9 +425,10 @@ class PropertyMap(object):
return ("<PropertyMap object with key type '%s' and value type '%s',"
+ " for %s, at 0x%x>") % (k, self.value_type(), g, id(self))
def copy(self):
"""Return a copy of the property map."""
return self.get_graph().copy_property(self)
def copy(self, value_type=None):
"""Return a copy of the property map. If ``value_type`` is specified,
the value type is converted to the chosen type."""
return self.get_graph().copy_property(self, value_type=value_type)
def get_graph(self):
"""Get the graph class to which the map refers."""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment