Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107609 > unrolled thread
| Started by | Michael Torrie <torriem@gmail.com> |
|---|---|
| First post | 2016-04-25 08:46 -0600 |
| Last post | 2016-04-25 08:46 -0600 |
| 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: what is the difference between one-line-operation and 2-line-operation Michael Torrie <torriem@gmail.com> - 2016-04-25 08:46 -0600
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2016-04-25 08:46 -0600 |
| Subject | Re: what is the difference between one-line-operation and 2-line-operation |
| Message-ID | <mailman.82.1461595617.32212.python-list@python.org> |
On 04/25/2016 08:13 AM, oyster wrote: > so, what produces this difference between py2 and py3 in nature? is > there more examples? where can I find the text abiut his difference? One thing I see is that both your py2 and py3 examples are treating print as a function. It's only a function in Py3. By default in Py2 it's a statement. You passed it a tuple, and that's what it prints. If you add: from __future__ import print_function then py2 and py3 will behave the same in regards to print.
Back to top | Article view | comp.lang.python
csiph-web