Persistent failure of 'break' statement ( novice )

Xavier Ho contact at xavierho.com
Sun Jun 14 03:15:03 CEST 2009


I don't see any error in that code except the fact HTML ate one space from
the code you pasted. It worked fine and perfectly as expected, even with
print(num) present.

I think you have either a run-time environment problem, or an editor
encoding problem. Try a different editor, and/or different ways of launching
the program. And share with us what you did to run this to begin with, that
might help as well.

Best regards,

Ching-Yun "Xavier" Ho, Technical Artist

Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: contact at xavierho.com
Website: http://xavierho.com/


On Sun, Jun 14, 2009 at 10:20 AM, <pdlemper at earthlink.net> wrote:

> Thanks Mark & Rhodri.  Neither works.
>
> I'm using Notepad2 as editor.  Don't use the tab. Each space
> counted with spacebar & recounted.  Rewrote the block from
> scratch as new script and eliminated the print line in the loop.
> Now no error message, but it will go on forever despite repeatedly
> entering 0.  Have to get out with ctrl-c .
>
> while True :
>    num = int(input())
>    if num == 0 :
>        break
>
> print('done')
>
>           Frusting: I'm missing something fundamental. Dave WB3DWE
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090614/9acbecba/attachment.html>


More information about the Python-list mailing list