mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Change _nametowidget to nametowidget -- it is a public interface.
This commit is contained in:
parent
d56924258a
commit
98b9d77666
1 changed files with 2 additions and 1 deletions
|
|
@ -495,7 +495,7 @@ class Misc:
|
||||||
v = self._register(v)
|
v = self._register(v)
|
||||||
res = res + ('-'+k, v)
|
res = res + ('-'+k, v)
|
||||||
return res
|
return res
|
||||||
def _nametowidget(self, name):
|
def nametowidget(self, name):
|
||||||
w = self
|
w = self
|
||||||
if name[0] == '.':
|
if name[0] == '.':
|
||||||
w = w._root()
|
w = w._root()
|
||||||
|
|
@ -510,6 +510,7 @@ class Misc:
|
||||||
w = w.children[name]
|
w = w.children[name]
|
||||||
name = tail
|
name = tail
|
||||||
return w
|
return w
|
||||||
|
_nametowidget = nametowidget
|
||||||
def _register(self, func, subst=None, needcleanup=1):
|
def _register(self, func, subst=None, needcleanup=1):
|
||||||
f = CallWrapper(func, subst, self).__call__
|
f = CallWrapper(func, subst, self).__call__
|
||||||
name = `id(f)`
|
name = `id(f)`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue