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
64520e73
Commit
64520e73
authored
Jul 02, 2020
by
Tiago Peixoto
Browse files
Fix PropertyDict.clear()
parent
867d13c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/__init__.py
View file @
64520e73
...
...
@@ -1480,11 +1480,11 @@ class PropertyDict(object):
def
clear
(
self
):
keys
=
[]
for
k
in
self
.
properties
.
item
s
():
for
k
in
self
.
properties
.
key
s
():
if
k
[
0
]
==
self
.
t
:
keys
.
append
(
k
[
1
]
)
keys
.
append
(
k
)
for
k
in
keys
:
del
self
.
properties
[
(
self
.
t
,
k
)
]
del
self
.
properties
[
k
]
def
__len__
(
self
):
count
=
0
...
...
@@ -1513,8 +1513,10 @@ class PropertyDict(object):
def
keys
(
self
):
return
self
.
iterkeys
()
def
values
(
self
):
return
self
.
itervalues
()
def
__repr__
(
self
):
temp
=
dict
([(
k
[
1
],
v
)
for
k
,
v
in
self
.
properties
.
items
()
if
k
[
0
]
==
self
.
t
])
return
repr
(
temp
)
...
...
Write
Preview
Markdown
is supported
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