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


Groups > comp.lang.python > #22118

Re: Help needed to understand the error message

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: Help needed to understand the error message
Date 2012-03-24 13:11 -0400
Organization > Bestiaria Support Staff <
References <CABWU=QmEPoxATQ5tBcp4H5DxiCvPGBzq9p09gBVBL=L4VeT1rQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.953.1332609815.3037.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, 24 Mar 2012 09:07:35 +0530, Aloke Ghosh <akghosh3@gmail.com>
declaimed the following in gmane.comp.python.general:

> 
> I feel the error is in Capital P in print .
> However the error indicated with "*^*"
> hints at quote at the end of the line.
>
	Yes... Python is case sensitive, and the keyword/statement (in
versions <3.x) or standard function (in 3.x) uses

		print

	The ^ at the end of the line essentially points out where Python
gave up trying to turn the statement into something valid. Consider

	Print = "This is a string"
or
	Print("This is a string")
to
	Print "This is a string"

	The first is valid -- "Print" is a user name being bound to a
string. The second implies a user procedure named "Print" being called
with one argument. The third line can not be decoded into anything valid
-- was it supposed to be a function call missing () or a binding missing
the =
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Re: Help needed to understand the error message Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-03-24 13:11 -0400

csiph-web