Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
0c4b511c
Commit
0c4b511c
authored
Jul 02, 2013
by
Tiago Peixoto
Browse files
Implemet __copy__ in Graph and PropertyMap
parent
808318a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/__init__.py
View file @
0c4b511c
...
...
@@ -445,6 +445,9 @@ class PropertyMap(object):
the value type is converted to the chosen type."""
return
self
.
get_graph
().
copy_property
(
self
,
value_type
=
value_type
)
def
__copy__
(
self
):
return
self
.
copy
()
def
get_graph
(
self
):
"""Get the graph class to which the map refers."""
g
=
self
.
__g
()
...
...
@@ -1141,6 +1144,9 @@ class Graph(object):
are also copied."""
return
Graph
(
self
)
def
__copy__
(
self
):
return
self
.
copy
()
def
__repr__
(
self
):
# provide more useful information
d
=
"directed"
if
self
.
is_directed
()
else
"undirected"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment