summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/font.py
diff options
context:
space:
mode:
authorDesmond Cheong <desmondcheongzx@gmail.com>2020-12-25 21:18:06 (GMT)
committerGitHub <noreply@github.com>2020-12-25 21:18:06 (GMT)
commit36a779e64c580519550aa6478c5aa8c58b8fa7b6 (patch)
tree9ee86f0cbe8e6a0de0cbe8f3544374ca0fdd7b8a /Lib/tkinter/font.py
parent675c97eb6c7c14c6a68ebf476c52931c1e5c1220 (diff)
downloadcpython-36a779e64c580519550aa6478c5aa8c58b8fa7b6.zip
cpython-36a779e64c580519550aa6478c5aa8c58b8fa7b6.tar.gz
cpython-36a779e64c580519550aa6478c5aa8c58b8fa7b6.tar.bz2
bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)
Diffstat (limited to 'Lib/tkinter/font.py')
-rw-r--r--Lib/tkinter/font.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
index 7f6ba5a..06ed01b 100644
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -17,10 +17,10 @@ BOLD = "bold"
ITALIC = "italic"
-def nametofont(name):
+def nametofont(name, root=None):
"""Given the name of a tk named font, returns a Font representation.
"""
- return Font(name=name, exists=True)
+ return Font(name=name, exists=True, root=root)
class Font: