Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29673 > unrolled thread
| Started by | gengyangcai@gmail.com |
|---|---|
| First post | 2012-09-21 13:20 -0700 |
| Last post | 2012-09-22 23:28 +0000 |
| Articles | 10 — 9 participants |
Back to article view | Back to comp.lang.python
Print Function gengyangcai@gmail.com - 2012-09-21 13:20 -0700
Re: Print Function Rodrick Brown <rodrick.brown@gmail.com> - 2012-09-21 16:28 -0400
Re: Print Function Tarek Ziadé <tarek@ziade.org> - 2012-09-21 22:29 +0200
Re: Print Function Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-21 14:54 -0600
Re: Print Function Alister <alister.ware@ntlworld.com> - 2012-09-21 21:11 +0000
Re: Print Function Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-21 16:43 -0600
Re: Print Function John Gordon <gordon@panix.com> - 2012-09-21 21:17 +0000
Re: Print Function Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-22 01:26 +0000
Re: Print Function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-22 08:27 +0100
Re: Print Function Walter Hurry <walterhurry@lavabit.com> - 2012-09-22 23:28 +0000
| From | gengyangcai@gmail.com |
|---|---|
| Date | 2012-09-21 13:20 -0700 |
| Subject | Print Function |
| Message-ID | <db8c7111-8fc7-4884-8c58-987399f7793f@googlegroups.com> |
Hello , I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a lot . GengYang
[toc] | [next] | [standalone]
| From | Rodrick Brown <rodrick.brown@gmail.com> |
|---|---|
| Date | 2012-09-21 16:28 -0400 |
| Message-ID | <mailman.1037.1348259308.27098.python-list@python.org> |
| In reply to | #29673 |
Go away troll! Sent from my iPhone On Sep 21, 2012, at 4:27 PM, "gengyangcai@gmail.com" <gengyangcai@gmail.com> wrote: > Hello , > > > I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a lot . > > > GengYang > -- > http://mail.python.org/mailman/listinfo/python-list
[toc] | [prev] | [next] | [standalone]
| From | Tarek Ziadé <tarek@ziade.org> |
|---|---|
| Date | 2012-09-21 22:29 +0200 |
| Message-ID | <mailman.1038.1348259365.27098.python-list@python.org> |
| In reply to | #29673 |
On 9/21/12 10:20 PM, gengyangcai@gmail.com wrote:
> Hello ,
>
>
> I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a lot .
print was a statement in python 2.x, it is now a function so you need
parenthesis:
>>> print("Game Over")
Game Over
>
>
> GengYang
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2012-09-21 14:54 -0600 |
| Message-ID | <mailman.1041.1348260886.27098.python-list@python.org> |
| In reply to | #29673 |
On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown <rodrick.brown@gmail.com> wrote: > Go away troll! Troll? It looked like a sincere question to me.
[toc] | [prev] | [next] | [standalone]
| From | Alister <alister.ware@ntlworld.com> |
|---|---|
| Date | 2012-09-21 21:11 +0000 |
| Message-ID | <5K47s.294147$Up5.154909@fx06.am4> |
| In reply to | #29682 |
On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote: > On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown <rodrick.brown@gmail.com> > wrote: >> Go away troll! > > Troll? It looked like a sincere question to me. but one that page 1 of the documentation would answer. -- Waste not, get your budget cut next year.
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2012-09-21 16:43 -0600 |
| Message-ID | <mailman.1047.1348267417.27098.python-list@python.org> |
| In reply to | #29684 |
On Fri, Sep 21, 2012 at 3:11 PM, Alister <alister.ware@ntlworld.com> wrote: > On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote: > >> On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown <rodrick.brown@gmail.com> >> wrote: >>> Go away troll! >> >> Troll? It looked like a sincere question to me. > > but one that page 1 of the documentation would answer. So point the asker to the documentation, don't just dismiss them as a troll. This newsgroup has a reputation for being friendly. Let's keep it that way.
[toc] | [prev] | [next] | [standalone]
| From | John Gordon <gordon@panix.com> |
|---|---|
| Date | 2012-09-21 21:17 +0000 |
| Message-ID | <k3ilhp$ckn$1@reader1.panix.com> |
| In reply to | #29673 |
In <db8c7111-8fc7-4884-8c58-987399f7793f@googlegroups.com> gengyangcai@gmail.com writes:
> I am currently using Python 3.2.3 . WHen I use the print function by
> typing print "Game Over" , it mentions " SyntaxError : invalid syntax ".
> Any ideas on what the problem is and how to resolve it ? Thanks a lot .
In python version 3, print was changed into a function.
Use this and it will work:
print("Game Over")
--
John Gordon A is for Amy, who fell down the stairs
gordon@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2012-09-22 01:26 +0000 |
| Message-ID | <505d13d3$0$29981$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #29673 |
On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: > I am currently using Python 3.2.3 . WHen I use the print function by > typing print "Game Over" , it mentions " SyntaxError : invalid syntax > ". Any ideas on what the problem is and how to resolve it ? No, none what so ever. Perhaps you are the first person in the world to have come across this error. If you ever solve it, please write up the solution and put it on a blog or a website somewhere so that if it ever happens again, googling for "python print SyntaxError" will return a useful result. Tongue-firmly-in-cheek-ly y'rs, -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2012-09-22 08:27 +0100 |
| Message-ID | <mailman.1068.1348298840.27098.python-list@python.org> |
| In reply to | #29704 |
On 22/09/2012 02:26, Steven D'Aprano wrote: > On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: > >> I am currently using Python 3.2.3 . WHen I use the print function by >> typing print "Game Over" , it mentions " SyntaxError : invalid syntax >> ". Any ideas on what the problem is and how to resolve it ? > > No, none what so ever. Perhaps you are the first person in the world to > have come across this error. If you ever solve it, please write up the > solution and put it on a blog or a website somewhere so that if it ever > happens again, googling for "python print SyntaxError" will return a > useful result. > > Tongue-firmly-in-cheek-ly y'rs, > > + one trillion -- Cheers. Mark Lawrence.
[toc] | [prev] | [next] | [standalone]
| From | Walter Hurry <walterhurry@lavabit.com> |
|---|---|
| Date | 2012-09-22 23:28 +0000 |
| Message-ID | <k3lhia$pl$1@news.albasani.net> |
| In reply to | #29704 |
On Sat, 22 Sep 2012 01:26:43 +0000, Steven D'Aprano wrote: > On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: > >> I am currently using Python 3.2.3 . WHen I use the print function by >> typing print "Game Over" , it mentions " SyntaxError : invalid syntax >> ". Any ideas on what the problem is and how to resolve it ? > > No, none what so ever. Perhaps you are the first person in the world to > have come across this error. If you ever solve it, please write up the > solution and put it on a blog or a website somewhere so that if it ever > happens again, googling for "python print SyntaxError" will return a > useful result. > > Tongue-firmly-in-cheek-ly y'rs, I think OP rather gave the game away with the subject line.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web