• Guido van Rossum's avatar
    Another optimization, probably of negligeable effect: instead of · 0132f69c
    Guido van Rossum yazdı
    calling self.tk.getint() and self.tk.getdouble(), call the globals
    getint() and getdouble(), which in turn are just names for the Python
    builtins int() and double().  (Making them globals actually save a
    dict lookup compared to using the built-in.)  The corresponding
    methods of class Misc have been changed similarly.  (Note that
    getboolean() hasn't been changed because there's no Python
    equivalent.)
    
    The use of int() and float() has another advantage: if/when Tcl calls
    can actually return Tcl objects with other types than string, use of
    int() and float() is essential.
    0132f69c
Tkinter.py 58.7 KB