diff options
Diffstat (limited to 'Lib/tkinter/font.py')
-rw-r--r-- | Lib/tkinter/font.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index 0103195da3..27e0cc849a 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py @@ -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: |