Open avidspartan1 opened 6 months ago
Hi! I don't have an answer aside from copy.deepcopy. What is the use case, out of curiosity?
The only ways I can see the recursion error happening are if the wikicode is extremely deeply nested (but this shouldn't be possible normally since the parser has a much lower recursion limit than Python) or if a node was somehow made a child of one of its ancestors.
Can you share the code/wikitext?
@avidspartan1 Can you share the code/wikitext triggering this?
(if not I think it can be safely closed)
Hi! I'm curious as to the "proper" way to deeply copy a Wikicode object.
So far, I've been using the
copy
module'sdeepcopy
method successfully, although recently I ran into a recursion error (stacktrace abbreviated):One thought was to raise the recursion limit, but I thought I'd post here first to see if there's a better way to deeply copy a Wikicode object.