Am 16.05.19 um 22:29 schrieb dm:
> Hi!
>
> I'm having problems wrapping my head around this behaviour:
>
> g = gt.Graph()
> g.add_vertex()
> g.vp['name_num'] = g.new_vp('object')
> print(g.vp.name_num[0]) # None
> g.vp.name_num[0] = [('a', 1)]
> print(g.vp.name_num[0]) # [('a', 1)]
> g.vp.name_num[0] = g.vp.name_num[0].append(('b', 2))
> print(g.vp.name_num[0]) # None
This is perfectly normal and expected behavior, since the append() method
returns None, which you are assigning to the property value.
--
Tiago de Paula Peixoto <[email protected]>
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool