[Tkinter-discuss] errors in versions?
DFDahlke at shieldsbag.com
Thu Jul 21 23:15:10 CEST 2005
I guess I'm a semi-newbie to python. I played with it a number of years
ago and thought this was way better than perl in some respects. Going
over the old 'Learning Python' book again I tried a couple of the
gotchas. I realize I'm running some fairly old versions of python, but
shouldn't be too out of date.
I have the windows version PythonWin 2.3.2 (#49, Nov 13 2003, 10:34:54)
[MSC v.1200 32 bit (Intel)] on win32.
On our SCO system, yes I know.. why?, I'm running Python 2.4.1 (#10, Jun
27 2005, 16:01:01) [C] on unixware7.
One would think these are fairly close together as far as updates. I am
running the PythonWin app on my windows so maybe that's why. Anyway,
running the 'Gotchas' on page 121 as below, the windows version works as
you would hope it would, you get the answer 81 as you would expect if
you didn't know it was a gotcha. On the unix server, you get 16 which
is what the book says. Here is the code:
>>> def outer(x,y):
... def inner(a=x, b=y):
... return a**b
... return inner
>>> x = outer(2,4)
Just wonder if anyone else found that to be a problem with levels
Shields Bag and Printing
More information about the Tkinter-discuss