mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
SF patch #701494: more apply removals
This commit is contained in:
parent
50c61d5a6c
commit
ff41c48a77
23 changed files with 2437 additions and 2449 deletions
|
@ -73,7 +73,7 @@ class Font:
|
|||
if not name:
|
||||
name = "font" + str(id(self))
|
||||
self.name = name
|
||||
apply(root.tk.call, ("font", "create", name) + font)
|
||||
root.tk.call("font", "create", name, *font)
|
||||
# backlinks!
|
||||
self._root = root
|
||||
self._split = root.tk.splitlist
|
||||
|
@ -90,7 +90,7 @@ class Font:
|
|||
|
||||
def copy(self):
|
||||
"Return a distinct copy of the current font"
|
||||
return apply(Font, (self._root,), self.actual())
|
||||
return Font(self._root, **self.actual())
|
||||
|
||||
def actual(self, option=None):
|
||||
"Return actual font attributes"
|
||||
|
@ -108,8 +108,8 @@ class Font:
|
|||
def config(self, **options):
|
||||
"Modify font attributes"
|
||||
if options:
|
||||
apply(self._call, ("font", "config", self.name) +
|
||||
self._set(options))
|
||||
self._call("font", "config", self.name,
|
||||
*self._set(options))
|
||||
else:
|
||||
return self._mkdict(
|
||||
self._split(self._call("font", "config", self.name))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue