]> granicus.if.org Git - python/commit
Another optimization, probably of negligeable effect: instead of
authorGuido van Rossum <guido@python.org>
Thu, 30 Apr 1998 17:50:36 +0000 (17:50 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 30 Apr 1998 17:50:36 +0000 (17:50 +0000)
commit0132f69c2ef8bcc49cf30c955ac5cc215eea50a0
tree82836107cbb22e9ebc820b578f716aec1ed9782d
parentcc8e1a4ed743f66be763f9bb9f40539b2572bf5c
Another optimization, probably of negligeable effect: instead of
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.
Lib/lib-tk/Tkinter.py