New submission from Martin v. Löwis <mar...@v.loewis.de>: In Base.replace, the method checks that self.parent is not None - however, it (unfortunately), breaks this very property itself if self is new, or self in new.
In particular, some fixers return node from transform if they don't want to do anything. In that case, self.parent gets set to None, even though new (which is self) is still connected to the tree. This patch a) short-cuts the case that self is new b) arranges to set parent of the new nodes only after clearing parent of self ---------- components: 2to3 (2.x to 3.0 conversion tool) files: python.patch keywords: patch messages: 92563 nosy: loewis severity: normal status: open title: Base.replace breaks tree Added file: http://bugs.python.org/file14883/python.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6899> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com