Commit 39f00377 authored by Andrew Svetlov's avatar Andrew Svetlov

Issue #802310: Generate always unique tkinter font names if not directly passed

parent 5af3e1af
......@@ -8,6 +8,7 @@
__version__ = "0.9"
import itertools
import tkinter
......@@ -46,6 +47,8 @@ class Font:
"""
counter = itertools.count(1)
def _set(self, kw):
options = []
for k, v in kw.items():
......@@ -75,7 +78,7 @@ class Font:
else:
font = self._set(options)
if not name:
name = "font" + str(id(self))
name = "font" + str(next(self.counter))
self.name = name
if exists:
......
......@@ -19,6 +19,8 @@ Core and Builtins
Library
-------
- Issue #802310: Generate always unique tkinter font names if not directly passed.
- Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms. Patch by Popa Claudiu.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment