Whole file

caesar0301/treelib

The author described this change as Fix subtree() cannot cooperate with rsearch(). It counts as a record because the check below fails on the code as it stood at 43cd88bd0 and passes on d3985face, with nothing else changed between the two runs.

Fix saved2014-05-09
Sharing licenceApache-2.0 · LICENSE
Change size+2 1

What the code was meant to do, written into the code itself as a save note

Fix subtree() cannot cooperate with rsearch()

The change

478478 while current is not None:
479479 if filter(self[current]):
480480 yield current
481- current = self[current].bpointer
481+ # subtree() hasn't update the bpointer
482+ current = self[current].bpointer if self.root != current else None
482483
483484 def save2file(self, filename, nid=None, level=ROOT, idhidden=True,
484485 filter=None, key=None, reverse=False, line_type='ascii-ex'):

The check that tells the two apart

failpass·tests/test_treelib.py::TreeCase::test_subtree

Check file tests/test_treelib.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it43cd88bd00d56a3ca5382d021aa49e50af9ecf5e
Broken version dated2014-05-04
Moduletreelib.tree
Units changedTree
Fingerprint00233fe1f3028998
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in caesar0301/treelib