[issue28498] tk busy command

klappnase report at bugs.python.org
Sun Oct 23 08:11:31 EDT 2016


klappnase added the comment:

As far as I can see, most internal Tkinter methods use _getboolean(), which currently looks like:

    def _getboolean(self, string):
        """Internal function."""
        if string:
            return self.tk.getboolean(string)

I am not 100% sure about this, but I figure that when this was written it was intentional that if "string" is an empty string, it should return None instead of (back then) 0 or 1. Today this would probably translate into something like:

    def _getboolean(self, value):
        if not value in ('', None):
            return bool(self.tk.getboolean(value))

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28498>
_______________________________________


More information about the Python-bugs-list mailing list