Jump to content


Photo

Chapter 4: Undefined Object Example


  • Please log in to reply
1 reply to this topic

#1 dilbertBear

dilbertBear

    Active Member

  • Members
  • PipPip
  • 13 posts

Posted 06 March 2011 - 05:55 PM

In Chapter 4, pg 118, there is an IDLE session that attempts to call a close function using an undefined file object. I typed in the code, ran it, but didn't get the Traceback and NameError. My code printed the 'File error' message and nothing else.

I'm using Python 3.2 on Win7 (64 bit). Did the behavior of Python change?

#2 dilbertBear

dilbertBear

    Active Member

  • Members
  • PipPip
  • 13 posts

Posted 06 March 2011 - 06:03 PM

Never mind. 'data' was defined from the previous Sharpen your Pencil exercise.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users