Fixed 'propagate' method

This commit is contained in:
Guido van Rossum 1994-12-30 17:16:35 +00:00
parent 588633daa2
commit 5505d56f08
2 changed files with 10 additions and 8 deletions

View File

@ -595,12 +595,13 @@ class Pack:
dict[key] = value dict[key] = value
return dict return dict
info = newinfo info = newinfo
def propagate(self, boolean=None): _noarg_ = ['_noarg_']
if boolean: def propagate(self, flag=_noarg_):
self.tk.call('pack', 'propagate', self._w) if boolean is Pack._noarg_:
else:
return self._getboolean(self.tk.call( return self._getboolean(self.tk.call(
'pack', 'propagate', self._w)) 'pack', 'propagate', self._w))
else:
self.tk.call('pack', 'propagate', self._w, flag)
def slaves(self): def slaves(self):
return map(self._nametowidget, return map(self._nametowidget,
self.tk.splitlist( self.tk.splitlist(

View File

@ -595,12 +595,13 @@ class Pack:
dict[key] = value dict[key] = value
return dict return dict
info = newinfo info = newinfo
def propagate(self, boolean=None): _noarg_ = ['_noarg_']
if boolean: def propagate(self, flag=_noarg_):
self.tk.call('pack', 'propagate', self._w) if boolean is Pack._noarg_:
else:
return self._getboolean(self.tk.call( return self._getboolean(self.tk.call(
'pack', 'propagate', self._w)) 'pack', 'propagate', self._w))
else:
self.tk.call('pack', 'propagate', self._w, flag)
def slaves(self): def slaves(self):
return map(self._nametowidget, return map(self._nametowidget,
self.tk.splitlist( self.tk.splitlist(