----- Original Message ----- 
From: "Jim Morcombe" <[EMAIL PROTECTED]>
To: <tutor@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 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to