[Tutor] IDLE question
Olavi Ivask
olavi at city.ee
Wed Jun 30 05:20:03 EDT 2004
after print "yes" press "Enter", and then "Backspace".do not use
spacebar here.
Then it's correct
>>>if D.has_key("b"):
print "yes"
else:
print "no"
Olavi ivask
Dick Moores wrote:
> 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
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list