Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54446
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'syntax': 0.04; 'elif': 0.05; 'messages.': 0.05; 'error:': 0.07; '"no"': 0.09; 'assigning': 0.09; 'editor.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'restart': 0.09; 'subject:Why': 0.09; 'whatever.': 0.09; 'def': 0.12; '""")': 0.16; '"n"': 0.16; '"new': 0.16; 'block.': 0.16; 'broken.': 0.16; 'fine.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:run': 0.16; 'subject:under': 0.16; 'subject:when': 0.16; 'traceback.': 0.16; 'wrote:': 0.18; 'pointed': 0.19; 'header:User- Agent:1': 0.23; 'error': 0.23; 'specify': 0.24; 'header:X -Complaints-To:1': 0.27; 'lines': 0.31; 'text': 0.33; "can't": 0.35; 'but': 0.35; 'skip:~ 10': 0.36; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'should': 0.36; 'list': 0.37; 'expected': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'how': 0.40; 'is.': 0.60; 'new': 0.61; 'entire': 0.61; 'simple': 0.61; "you're": 0.61; 'name': 0.63; 'such': 0.63; 'different': 0.65; 'within': 0.65; 'direct': 0.67; 'close': 0.67; 'yes': 0.68; 'subject:have': 0.80; 'william': 0.81; 'why?': 0.91; 'yours.': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dave Angel <davea@davea.name> |
| Subject | Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? |
| Date | Thu, 19 Sep 2013 20:18:36 +0000 (UTC) |
| References | <22b99b0a-598f-4500-9de9-5041c2ce2c8f@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 174.32.174.35 |
| User-Agent | XPN/1.2.6 (Street Spirit ; Linux) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.163.1379621946.18130.python-list@python.org> (permalink) |
| Lines | 68 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1379621946 news.xs4all.nl 15962 [2001:888:2000:d::a6]:39487 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:54446 |
Show key headers only | View raw
On 19/9/2013 14:46, William Bryant wrote:
> the word 'def' has squiggily lines but the program works fine. It says: Syntax Error: expected an indented block. - why?
>
The direct answer is that your terminal program must be broken. it
should not use "squiggly lines" for any purposes.
But perhaps you're not seeing this in terminal, but in some text editor.
Better specify what that is.
As for the "Syntax Error..." Better supply the entire traceback. I
can't see how you consider that error message as "working."
> def restart():
Better give it a different name, since you're using this same name as a
local within the function.
> print("""
>
> ~~~~~~~~~~~~~~~~
>
> Cacluation DONE!
>
> ~~~~~~~~~~~~~~~~
>
> """)
> restart = input("\nEnter yes if you want to make a new list and no if you want to close the program (yes/no): ")
> restart
This line does nothing, as has been pointed out before in other
messages. of yours. You're not printing it, assigning it to something,
calling it, or whatever.
> if restart == "yes" or restart == "y" or restart == "new list":
> print("You want make a new list...\n")
> time.sleep(1)
> NOS()
There's no such function.
> elif restart == "no" or restart == "n" or restart == "close":
> print("Goodbye!")
> time.sleep(1)
> print("Goodbye!")
> time.sleep(1)
> print("Goodbye!")
> time.sleep(1)
> print("Goodbye!")
> time.sleep(1)
> print("Goodbye!")
> time.sleep(1)
> quit()
No such function.
> else:
> print("type y or n")
> time.sleep(0.5)
> restart()
You're using recursion when a simple loop is called for.
--
DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? William Bryant <gogobebe2@gmail.com> - 2013-09-19 11:46 -0700
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? John Gordon <gordon@panix.com> - 2013-09-19 18:51 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? patrick vrijlandt <patrick.vrijlandt@gmail.com> - 2013-09-19 19:08 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Ian Kelly <ian.g.kelly@gmail.com> - 2013-09-19 13:01 -0600
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Dave Angel <davea@davea.name> - 2013-09-19 20:18 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Ian Kelly <ian.g.kelly@gmail.com> - 2013-09-19 17:09 -0600
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? William Bryant <gogobebe2@gmail.com> - 2013-09-20 00:01 -0700
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? William Ray Wing <wrw@mac.com> - 2013-09-20 09:04 -0400
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Duncan Booth <duncan.booth@invalid.invalid> - 2013-09-20 13:39 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? William Bryant <gogobebe2@gmail.com> - 2013-09-20 22:59 -0700
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? William Bryant <gogobebe2@gmail.com> - 2013-09-20 23:07 -0700
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-21 10:25 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Dave Angel <davea@davea.name> - 2013-09-21 12:53 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? MRAB <python@mrabarnett.plus.com> - 2013-09-21 17:18 +0100
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? Dave Angel <davea@davea.name> - 2013-09-21 18:09 +0000
Re: Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it? alex23 <wuwei23@gmail.com> - 2013-09-23 10:39 +1000
csiph-web