[Tutor] using quotes in IDLE

Ole Henning Jensen tjampman at gmail.com
Fri Dec 14 16:45:48 CET 2007


----- Original Message ----- 
From: "Jim Morcombe" <jmorcombe at westnet.com.au>
To: <tutor at python.org>
Sent: Friday, December 14, 2007 2:43 AM
Subject: [Tutor] using quotes in IDLE


A really dumb question...

When typing things into IDLE, how are quotes meant to work?

If I type"

employee.name = "Susan"

then IDLE ignores the last " and I get an error.
-------------------------------------------------------

When pasting you code into IDLE i get this:

>>> employee.name = "Susan"

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    employee.name = "Susan"
NameError: name 'employee' is not defined

which is the result of me not having a class called employee, do you have 
that?
If not, you can't use dots in variable names so in stead of 'employee.name' 
you could use employeeName or employee_name

fx
>>> employee_name = "susan"
>>> print employee_name
susan


Regards Ole Jensen 




More information about the Tutor mailing list