[2.7] bpo-33096: Fix ttk.Treeview.insert. (GH-6228) (GH-6326)
Allow ttk.Treeview.insert to insert iid that has a false boolean value.
Note iid=0 and iid=False would be same.
(cherry picked from commit 3ab44c0783eebdff687014f7d14d5dec59b6bd39)
Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
diff --git a/Lib/lib-tk/ttk.py b/Lib/lib-tk/ttk.py
index 6da1eb1..d4df408 100644
--- a/Lib/lib-tk/ttk.py
+++ b/Lib/lib-tk/ttk.py
@@ -1332,7 +1332,7 @@
already exist in the tree. Otherwise, a new unique identifier
is generated."""
opts = _format_optdict(kw)
- if iid:
+ if iid is not None:
res = self.tk.call(self._w, "insert", parent, index,
"-id", iid, *opts)
else: