Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69762 > unrolled thread
| Started by | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| First post | 2014-04-06 12:32 +0100 |
| Last post | 2014-04-06 12:32 +0100 |
| 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: How can I parse this correctly? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-04-06 12:32 +0100
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-04-06 12:32 +0100 |
| Subject | Re: How can I parse this correctly? |
| Message-ID | <mailman.8948.1396783966.18130.python-list@python.org> |
On 06/04/2014 09:17, Chris Angelico wrote: > On Sun, Apr 6, 2014 at 4:29 PM, Anthony Papillion <papillion@gmail.com> wrote: >> No particular reason at all. I've Bern dabbling in Python for the last bit >> and am just writing code based on the samples or examples I'm finding. What >> was the tipoff that this was not Python 3? Would there be a large difference >> in this code if it was Python 3? > > The tip-off was that you have no parentheses around print's arguments. > Behold the vast difference that told me which it was: > > # Python 2: print is a statement > print int(row['YEAR']) > > # Python 3: print is a function > print(int(row['YEAR'])) > > So incredibly different :) But it's enough to show that you're on Python 2. > > ChrisA > I'd recommend using this import statement in Python 2 so you get used to print being a function. from __future__ import print_function -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Back to top | Article view | comp.lang.python
csiph-web