[Tutor] IDLE question
olavi at city.ee
Wed Jun 30 05:20:03 EDT 2004
after print "yes" press "Enter", and then "Backspace".do not use
Then it's correct
Dick Moores wrote:
> I'm trying to enter
> >>>if D.has_key("b"):
> print "yes"
> 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. ;-)
> Dick Moores
> Tutor maillist - Tutor at python.org
More information about the Tutor