Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #22118 > unrolled thread
| Started by | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| First post | 2012-03-24 13:11 -0400 |
| Last post | 2012-03-24 13:11 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Help needed to understand the error message Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-03-24 13:11 -0400
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2012-03-24 13:11 -0400 |
| Subject | Re: Help needed to understand the error message |
| Message-ID | <mailman.953.1332609815.3037.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web