[Tutor] IDLE question
Dick Moores
rdm at rcblue.com
Wed Jun 30 05:13:16 EDT 2004
I'm trying to enter
>>>if D.has_key("b"):
print "yes"
else:
print "no"
in IDLE v1.0.3. by typing it in, line by line. lines 1 and 2 go OK, but
hitting "Enter" after "yes" causes the cursor to move to just under the
"p" of "print", as expected. If I use the Backspace key and the space bar
to line up and indent "else:" correctly, hitting Enter after that causes
the error, "IndentationError: unindent does not match any outer
indentation level (<pyshell#10>, line 3)". Is there no way to get this
entered other than typing the 4 lines in a text editor and pasting them
all together into IDLE?
This is not an idle question. It's really been bugging me. ;-)
Thanks,
Dick Moores
More information about the Tutor
mailing list