-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-33096 Modify ttk.Treeview.insert #6228
Conversation
Allow ttk.Treeview.insert to insert False iid. Note iid=0 and iid=false would be same
da8cef1
to
d908060
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A news entry shouldn't be added directly in the NEWS file. Instead it should be added in a separate file in the NEWS.d directory. You can use the blurb
utility for creating it.
itemid = self.tv.insert('', 'end', 0.0) | ||
self.assertEqual(itemid, '0.0') | ||
# this is because False is resolveds to 0 and element with 0 id is already present | ||
self.assertRaises(tkinter.TclError, self.tv.insert, '', '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to wrap this line, it is not long enough.
Why the second argument of insert()
is ''
instead of 'end'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad this should be end only.
Also please add your name in Misc/ACKS and "Patch by your name." at the end of a news entry. |
My name is already in Misc/ACKS should I insert a duplicate entry? |
880e78a
to
7ab57c3
Compare
@@ -0,0 +1,4 @@ | |||
Allow ttk.Treeview.insert to insert False iid. | |||
Note iid=0 and iid=false would be same. | |||
Patch by Garvit Khatri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a period at the end.
@@ -0,0 +1,4 @@ | |||
Allow ttk.Treeview.insert to insert False iid. | |||
Note iid=0 and iid=false would be same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iid=False
@@ -0,0 +1,4 @@ | |||
Allow ttk.Treeview.insert to insert False iid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to insert iid that has a false boolean value."
No, one time is enough. 😄 |
Thanks @garvitdelhi for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7. |
GH-6246 is a backport of this pull request to the 3.7 branch. |
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 3ab44c0) Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
Sorry, @garvitdelhi and @serhiy-storchaka, I could not cleanly backport this to |
GH-6247 is a backport of this pull request to the 3.6 branch. |
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 3ab44c0) Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
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 3ab44c0) Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
GH-6326 is a backport of this pull request to the 2.7 branch. |
Allow ttk.Treeview.insert to insert False iid.
Note iid=0 and iid=false would be same
https://bugs.python.org/issue33096