Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49200

Re: newbie EOL while scanning string literal

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <robotsondrugs@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'syntax': 0.04; 'cpython': 0.05; 'string.': 0.05; 'assign': 0.07; 'detect': 0.07; 'assigning': 0.09; 'escape': 0.09; 'get.': 0.09; 'integers': 0.09; 'subject:string': 0.09; 'subject:while': 0.09; 'times,': 0.14; 'windows': 0.15; 'highlight': 0.16; 'ides': 0.16; 'immutable;': 0.16; 'integer,': 0.16; 'parentheses': 0.16; 'subject:literal': 0.16; 'subject:scanning': 0.16; 'traceback.': 0.16; 'tuple': 0.16; 'wrote:': 0.18; 'appears': 0.22; 'input': 0.22; 'header:User- Agent:1': 0.23; 'integer': 0.24; 'looks': 0.24; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'errors': 0.30; 'but': 0.35; 'received:google.com': 0.35; 'easily': 0.37; 'message- id:@gmail.com': 0.38; 'problems': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'helps': 0.61; 'full': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'such': 0.63; 'here': 0.66; 'experience.': 0.67; 'anything.': 0.68; 'prompt': 0.68; 'obvious': 0.74; '9.1': 0.84; 'freebsd': 0.84; 'laid': 0.84; 'obvious.': 0.84; 'shadow': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=jIl7sdSxB+pkeax+p4VoTtR0V48Ya0Tfz/ifJBihyPM=; b=XgcBqMAjLtgQATX+LRbnmzRUBWCnAmZLi66EbsO0s/mfLUW1rulZO2xsFKlOjkSU83 9D2sIue9terkfXq8CGUZy36w/4D3Bu+nuuXNXUPSorEA4n4ivzFuv5ZKG3llhYZb7qLZ bnm0qGCUwirEY+ptOzq8R7oQqs6Z2+nngiLqKeCLpsUuInkH61K68zdE/erGqUMWjPuP 4FHVgAPaj4kkOCXTR2trOa2u4xkp6X5GWZCfneXJRJDQuBs+FeezSXAKVBW4OSp997Bf AILqsN+AulAaeqg3wFHoGPWSW2kaJugDQhAZ0BklMKYc7+sF8kjuDQDUmpS8wa20T/A5 8xFg==
X-Received by 10.42.36.198 with SMTP id v6mr591283icd.58.1372199745571; Tue, 25 Jun 2013 15:35:45 -0700 (PDT)
Date Tue, 25 Jun 2013 17:35:11 -0500
From Andrew Berg <robotsondrugs@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version 1.0
To "comp.lang.python" <python-list@python.org>
Subject Re: newbie EOL while scanning string literal
References <da2378bb-e76b-4720-8071-784c717a8c38@googlegroups.com>
In-Reply-To <da2378bb-e76b-4720-8071-784c717a8c38@googlegroups.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3855.1372199747.3114.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1372199747 news.xs4all.nl 15864 [2001:888:2000:d::a6]:36059
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:49200

Show key headers only | View raw


On 2013.06.25 17:19, willlewis965@gmail.com wrote:
> na=('type first integer n\')##THE RED SHADOW APPEARS HERE##
Here you escape the closing single quote. \n is a line feed, not n\. Also, the parentheses are unnecessary, and it looks like you are a
assigning a tuple instead of a string.
Syntax errors are often the result of typos; IDEs can easily detect such problems and will highlight them for you to make them obvious.
>     int(naa)
Strings are immutable; this returns an integer, but you don't assign it to anything.
> is_triangle(na,ne,ni)
And here, you pass the strings you assigned for the input prompt instead of the integers you wanted to get.

BTW, if you have an error, it helps if you copy/paste the full traceback. Many times, the exact issue is laid out in the traceback, and the
solution is obvious to those with experience.
-- 
CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

newbie EOL while scanning string literal willlewis965@gmail.com - 2013-06-25 15:19 -0700
  Re: newbie EOL while scanning string literal willlewis965@gmail.com - 2013-06-25 15:25 -0700
  Re: newbie EOL while scanning string literal Andrew Berg <robotsondrugs@gmail.com> - 2013-06-25 17:35 -0500
  Re: newbie EOL while scanning string literal rurpy@yahoo.com - 2013-06-25 15:37 -0700
  Re: newbie EOL while scanning string literal rurpy@yahoo.com - 2013-06-25 16:44 -0700
    Re: newbie EOL while scanning string literal willlewis965@gmail.com - 2013-06-25 17:05 -0700
      Re: newbie EOL while scanning string literal rusi <rustompmody@gmail.com> - 2013-06-25 20:38 -0700
      Re: newbie EOL while scanning string literal Larry Hudson <orgnut@yahoo.com> - 2013-06-25 21:47 -0700
      Re: newbie EOL while scanning string literal Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-26 08:31 +0000

csiph-web