>
>
>>
> I also found this interesting (but possibly not to newbies :) :
> http://www.shinetech.com/attachments/108_python-language-internals.pdf
>
> Very helpful, especially that last resource. Thank you!
Serdar
___
Tutor maillist - Tutor@python.org
On 7/14/2010 11:11 AM Serdar Tumgoren said...
But I was wondering (for my own
edification), can anyone point to the portion of the docs that clearly
spells out the order of execution (top to bottom, classes vs. functions,
etc.).
I found this in the tutorial in the modules section:
( see http:
> Hmm..If I add a few debugging lines like that into my code, I get this:
>>
>
> The point was that statements in a class at class level (ie, not in defs)
> are executed sequentially and expect referenced variables to exist (ie,
> defined somewhere 'above' the current statement) -- there is no for
On 7/14/2010 9:33 AM Corey Richardson said...
Hmm..If I add a few debugging lines like that into my code, I get this:
The point was that statements in a class at class level (ie, not in
defs) are executed sequentially and expect referenced variables to exist
(ie, defined somewhere 'above' the
"Corey Richardson" wrote
defined the variable, I would understand, but I haven't. The
entirety of
my (incomplete and buggy) code is now available here:
http://pastebin.com/QTNmKYC6
There are quite a few errors here, one is that many of your class's
methods
don't have self as their first pa
Corey Richardson wrote:
The entirety of
my (incomplete and buggy) code is now available here:
http://pastebin.com/QTNmKYC6 ..
Hmm..If I add a few debugging lines like that into my code, I get this:
Starting program
In class Hangman
done defs in class
eWordEntryBox defined
Exception in Tki
Hmm..If
I add a few debugging lines like that into my code, I get this:
Starting program
In class Hangman
done defs in class
eWordEntryBox defined
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python31\lib\tkinter\__init__.py", line 1399, in __call__
ret
On 7/14/2010 8:31 AM Corey Richardson said...
I was under the impression that when you define a function, it doesn't
try to evaluate anything yet. If I had called the function before I
defined the variable, I would understand, but I haven't.
The difference is in understanding what's executed a
I was under the impression that when you define a function, it doesn't
try to evaluate anything yet. If I had called the function before I
defined the variable, I would understand, but I haven't. The entirety of
my (incomplete and buggy) code is now available here:
http://pastebin.com/QTNmKYC6
On Thu, 15 Jul 2010 12:18:58 am Corey Richardson wrote:
> Hey tutors. Two separate submissions one day, guess I'm getting busy
> ;)
>
> Anyway, I'm re-writing my hangman program to make use of my new-found
> understanding of OOP, and using a GUI this time around. I decided on
> coding with Tkinter,
>From the logs looks like the variable is not initiated when it was used.
If I read it correct, you said it down ... that means below the line where
the error came? and if they belong to same function then this error is valid
Thanks,
Nitin
On Wed, Jul 14, 2010 at 7:48 PM, Corey Richardson wrote
Hey tutors. Two separate submissions one day, guess I'm getting busy ;)
Anyway, I'm re-writing my hangman program to make use of my new-found
understanding of OOP, and using a GUI this time around. I decided on
coding with Tkinter, to get my feet wet with GUI stuff.
Here is the traceback:
Tra
12 matches
Mail list logo