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


Groups > comp.lang.python > #22111

Re: Help needed to understand the error message

Date 2012-03-24 04:00 +0000
From MRAB <python@mrabarnett.plus.com>
Subject Re: Help needed to understand the error message
References <CABWU=QmEPoxATQ5tBcp4H5DxiCvPGBzq9p09gBVBL=L4VeT1rQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.950.1332561654.3037.python-list@python.org> (permalink)

Show all headers | View raw


On 24/03/2012 03:37, Aloke Ghosh wrote:
> Hi,
> I am learning Python and do not have programming experience.
> I was following an exercise from
> http://learnpythonthehardway.org/book/ex2.html
> and made a mistake in entry :
>
> *Print"I like typing this."*
>
> and got the following error message:
>
> *In [2]: Print"I like typing this."*
> *------------------------------------------------------------*
> *   File "<ipython console>", line 1*
> *     Print"I like typing this."*
> *                                        ^*
> *SyntaxError: invalid syntax*
>
> I feel the error is in Capital P in print .

Correct. (I'm assuming that you're using Python 2; Python 3 is a little
different.)

> However the error indicated with "*^*"
> hints at quote at the end of the line.
>
> *Can any one please help me understand this.*
>
It will tell you approximately where the error is, but, as in this
example, the actual error may be a little earlier.

It tries to be helpful, but remember that it isn't intelligent! :-)

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


Thread

Re: Help needed to understand the error message MRAB <python@mrabarnett.plus.com> - 2012-03-24 04:00 +0000

csiph-web