Commit a5ba1166 authored by Tiago Peixoto's avatar Tiago Peixoto

Graph.copy_property(): default `g` to graph that owns `src`

parent 48759a07
Pipeline #648 passed with stage
in 136 minutes and 7 seconds
......@@ -2671,9 +2671,9 @@ class Graph(object):
then a new property map of the same type (or with the type given by the
optional ``value_type`` parameter) is created, and returned. The
optional parameter ``g`` specifies the source graph to copy properties
from (defaults to self). If ``full == False``, in the case of filtered
graphs only the unmasked values are copied (with the remaining ones
taking the type-dependent default value).
from (defaults to the graph than owns `src`). If ``full == False``, then
in the case of filtered graphs only the unmasked values are copied (with
the remaining ones taking the type-dependent default value).
"""
if tgt is None:
tgt = self.new_property(src.key_type(),
......@@ -2687,7 +2687,7 @@ class Graph(object):
raise ValueError("source and target properties must have the same key type")
if g is None:
g = self
g = src.get_graph()
sf = self
if full:
......
Markdown is supported
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