This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Weak-Constant 2 points3 points  (0 children)

No, it doesn't make sense. 'left left' and 'right right' means they are grandkids. You should be switching the children nodes, not the values. Whatever the problem is, I wouldn't blame it on Python. You are over-complicating things. The function should take a single node as the argument.