Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Doc/library/tkinter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ Base and mixin classes

.. method:: winfo_exists()

Return ``1`` if the widget exists, ``0`` otherwise.
Return true if the widget exists, false otherwise.

.. method:: winfo_fpixels(number)

Expand Down Expand Up @@ -2054,7 +2054,7 @@ Base and mixin classes

.. method:: winfo_ismapped()

Return ``1`` if the widget is currently mapped, ``0`` otherwise.
Return true if the widget is currently mapped, false otherwise.

.. method:: winfo_manager()

Expand Down Expand Up @@ -2185,8 +2185,8 @@ Base and mixin classes

.. method:: winfo_viewable()

Return ``1`` if the widget and all of its ancestors up through the
nearest toplevel window are mapped, ``0`` otherwise.
Return true if the widget and all of its ancestors up through the
nearest toplevel window are mapped, false otherwise.

.. method:: winfo_visual()

Expand Down Expand Up @@ -5591,7 +5591,7 @@ Widget classes
.. method:: edit_modified(arg=None)

If *arg* is omitted, return the current state of the modified flag as
``0`` or ``1``; the flag is set automatically whenever the text is
true or false; the flag is set automatically whenever the text is
inserted or deleted.
Otherwise set the flag to the boolean *arg*.

Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_tkinter/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,12 @@ def test_data(self):

def test_transparency(self):
image = self.create()
self.assertEqual(image.transparency_get(0, 0), True)
self.assertEqual(image.transparency_get(4, 6), False)
self.assertIs(image.transparency_get(0, 0), True)
self.assertIs(image.transparency_get(4, 6), False)
image.transparency_set(4, 6, True)
self.assertEqual(image.transparency_get(4, 6), True)
self.assertIs(image.transparency_get(4, 6), True)
image.transparency_set(4, 6, False)
self.assertEqual(image.transparency_get(4, 6), False)
self.assertIs(image.transparency_get(4, 6), False)
self.assertRaises(tkinter.TclError, image.transparency_get, -1, 0)
self.assertRaises(tkinter.TclError, image.transparency_get, 16, 0)
self.assertRaises(tkinter.TclError, image.transparency_set, -1, 0, True)
Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_tkinter/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def test_debug(self):
text = self.text
olddebug = text.debug()
try:
text.debug(0)
self.assertEqual(text.debug(), 0)
text.debug(1)
self.assertEqual(text.debug(), 1)
text.debug(False)
self.assertIs(text.debug(), False)
text.debug(True)
self.assertIs(text.debug(), True)
finally:
text.debug(olddebug)
self.assertEqual(text.debug(), olddebug)
Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_ttk/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,9 +1685,9 @@ def test_detach_reattach(self):
self.assertEqual(self.tv.get_children(item_id), ())

def test_exists(self):
self.assertEqual(self.tv.exists('something'), False)
self.assertEqual(self.tv.exists(''), True)
self.assertEqual(self.tv.exists({}), False)
self.assertIs(self.tv.exists('something'), False)
self.assertIs(self.tv.exists(''), True)
self.assertIs(self.tv.exists({}), False)

# the following will make a tk.call equivalent to
# tk.call(treeview, "exists") which should result in an error
Expand Down
4 changes: 2 additions & 2 deletions Lib/tkinter/ttk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1483,8 +1483,8 @@ def tag_configure(self, tagname, option=None, **kw):


def tag_has(self, tagname, item=None):
"""If item is specified, returns 1 or 0 depending on whether the
specified item has the given tagname. Otherwise, returns a list of
"""If item is specified, returns True if the specified item has the
given tagname, False otherwise. Otherwise, returns a list of
all items which have the specified tag.

* Availability: Tk 8.6"""
Expand Down
Loading