(self, what, sequence, func, add, needcleanup=1)
Internal function.
Internal function.
Internal function .
def _bind(self, what, sequence, func, add, needcleanup=1):
        """Internal function."""
        if isinstance(func, str):
            self.tk.call(what + (sequence, func))
        elif func:
            funcid = self._register(func, self._substitute,
                        needcleanup)
            cmd = ('%sif {"[%s %s]" == "break"} break\n'
                   %
                   (add and '+' or '',
                funcid, self._subst_format_str))
            self.tk.call(what + (sequence, cmd))
            return funcid
        elif sequence:
            return self.tk.call(what + (sequence,))
        else:
            return self.tk.splitlist(self.tk.call(what))
def _bind ( self , what , sequence , func , add , needcleanup = 1 ) : if isinstance ( func , str ) : self . tk . call ( what + ( sequence , func ) ) elif func : funcid = self . _register ( func , self . _substitute , needcleanup ) cmd = ( '%sif {"[%s %s]" == "break"} break\n' % ( add and '+' or '' , funcid , self . _subst_format_str ) ) self . tk . call ( what + ( sequence , cmd ) ) return funcid elif sequence : return self . tk . call ( what + ( sequence , ) ) else : return self . tk . splitlist ( self . tk . call ( what ) )