Re: [lxml-dev] Dealing with segfaults in lxml?
11 Oct
2007
11 Oct
'07
4:18 p.m.
Mike Meyer wrote:
On Wed, 10 Oct 2007 09:03:04 +0200 Stefan Behnel <stefan_ml@behnel.de> wrote:
d = dict(node.items())
or something in that line, which should even be faster as it avoids the intermediate attrib proxy and iterator creation steps. If you wan to be more selective, a generator expression will do.
I tried the node.items() variation, and that was still causing segfaults.
Then it's still different than I thought. If all you change is this line: d = dict(node.attrib) and you get segfaults with this: d = dict(node.items()) but not with this: d = dict() for key in keys: d[key] = node.get(key, 'ยด) I really can't extract anything meaningful from that. The complete valgrind trace would be helpful. Stefan
6066
Age (days ago)
6066
Last active (days ago)
0 comments
1 participants
participants (1)
-
Stefan Behnel