I know tkinter is just a wrapper for Tk but this reference to slaves is pretty bad. Maybe it could be referenced as child widgets? Pretty much anything other than slaves.
In tk and tkinters, 'slaves' refers to the geometry managed content of a container. In tk, the place, pack, and grid commands have option 'slaves'. In tkinter/__init__.py, class Misc has corresponding place/pack/grid/_slaves methods, which refer to 'slaves' in their docstring and which call tcl with the corresponding pair of strings. (Lines 1888, 1898, 2021.)
The tcl/tk people have already dealt with this issue. Current 8.6 has a 'content' option that is a synonym for the 'slaves' option. I don't know when these were added. @serhiy-storchaka Do you have the docs or knowledge needed to find out? In 9.0, the names have been reversed, in that 'slaves' is listed as a synonym for 'content'.
We could now add 'place_content = place_slaves', etc, synonyms. There are several others to consider. Misc has 'slaves = pack_slaves', so maybe add 'content = pack_content'. Eack of class Place, Pack, and Grid have lines like slaves = pack_slaves = Misc.pack_slaves (lines 2639, 2690, 2745). So add similar for 'content'?
In docstrings, replace 'slaves' with 'contents' or perhaps 'contained widgets' or even 'placed/packed/gridded widgets'. We should not use 'children' because in tkinter, a_widget.children is a dict mapping child names to the widgets created by passing a_widget as master, the first argument, such as child = tkinter.Text(a_widget). Subsequent on-screen placement is a different issue from creation ancestry, and a child can be a content of more than one container.
Once all tkinter-supported tk versions support 'content', we could change 'slaves' to 'content' in the tcl calls.
EDIT: Docstring changes could be backported. New method names cannot, are are definitely a new feature.
I agree with @terryjreedy. The documentation part is larger, because it needs to update both docstrings and the module documentation, and we should also update the use of "master" -- in modern Tk documentation they use "container widget" in context of geometry management. "master" is also the public attribute and parameter name -- in many cases "parent" would be more correct term, but it is difficult to change API. "master" can also be used in other contexts, we should not blindly try to get rid of it.
Activity
StanFromIreland commented on Jan 12, 2026
There are a series of occurrences both in tkinter/__init__.py and the doc. You can find suggestions for replacements in the devguide.
VanshAgarwal24036 commented on Jan 13, 2026
Hi, I’d like to work on this issue.
I understand that Tk itself uses this terminology, so my plan is to focus on:
(e.g. “child widgets”, “managed widgets”).
I’ll start by identifying all occurrences in tkinter/init.py and the docs,
and propose consistent replacements based on the devguide.
Please let me know if this approach sounds good.
Merge remote-tracking branch 'upstream/main' into pythongh-143754-tki…
i-make-data-sexy commented on Jan 13, 2026
That’s fantastic. Thank you! 👏
terryjreedy commented on Jan 14, 2026
In tk and tkinters, 'slaves' refers to the geometry managed content of a container. In tk, the place, pack, and grid commands have option 'slaves'. In tkinter/__init__.py, class Misc has corresponding place/pack/grid/_slaves methods, which refer to 'slaves' in their docstring and which call tcl with the corresponding pair of strings. (Lines 1888, 1898, 2021.)
The tcl/tk people have already dealt with this issue. Current 8.6 has a 'content' option that is a synonym for the 'slaves' option. I don't know when these were added. @serhiy-storchaka Do you have the docs or knowledge needed to find out? In 9.0, the names have been reversed, in that 'slaves' is listed as a synonym for 'content'.
We could now add 'place_content = place_slaves', etc, synonyms. There are several others to consider. Misc has 'slaves = pack_slaves', so maybe add 'content = pack_content'. Eack of class Place, Pack, and Grid have lines like slaves = pack_slaves = Misc.pack_slaves (lines 2639, 2690, 2745). So add similar for 'content'?
In docstrings, replace 'slaves' with 'contents' or perhaps 'contained widgets' or even 'placed/packed/gridded widgets'. We should not use 'children' because in tkinter, a_widget.children is a dict mapping child names to the widgets created by passing a_widget as master, the first argument, such as child = tkinter.Text(a_widget). Subsequent on-screen placement is a different issue from creation ancestry, and a child can be a content of more than one container.
Once all tkinter-supported tk versions support 'content', we could change 'slaves' to 'content' in the tcl calls.
EDIT: Docstring changes could be backported. New method names cannot, are are definitely a new feature.
pythongh-143754: Modernize Tkinter docs
pythongh-143754: Modernize Tkinter docs
pythongh-143754: Add Tkinter methods pack_content(), place_content() …
serhiy-storchaka commented on Jan 14, 2026
I agree with @terryjreedy. The documentation part is larger, because it needs to update both docstrings and the module documentation, and we should also update the use of "master" -- in modern Tk documentation they use "container widget" in context of geometry management. "master" is also the public attribute and parameter name -- in many cases "parent" would be more correct term, but it is difficult to change API. "master" can also be used in other contexts, we should not blindly try to get rid of it.
gh-143754: Modernize Tkinter docs (GH-143841)
pythongh-143754: Modernize Tkinter docs (pythonGH-143841)
pythongh-143754: Modernize Tkinter docs (pythonGH-143841)
pythongh-143754: Add Tkinter methods pack_content(), place_content() …
[3.13] gh-143754: Modernize Tkinter docs (GH-143841) (GH-144033)
[3.14] gh-143754: Modernize Tkinter docs (GH-143841) (GH-144032)
gh-143754: Add Tkinter methods pack_content(), place_content() and gr…
pythongh-143754: Modernize Tkinter docs (pythonGH-143841)
pythongh-143754: Add Tkinter methods pack_content(), place_content() …