From: Martin v. Loewis on 28 Jun 2010 17:34 > Until such time as 100% of the systems I might ever want to run my progams > on have python 3 installed, I cannot port my programs over from python 2. You don't have to port them from python 2, but still could it make easy to use them with Python 3: just arrange it so that 2to3 will correctly convert them to Python 3. You may not have to do anything to achieve this except for testing whether it actually works. Then, before using your program with Python 3, run it through 2to3, and only use the conversion result. Keep maintaining the 2.x source, rather than forking of a Py3 version. Of course, you may not have a need to do that today. A year from now may still be early enough. Regards, Martin
From: Chris Rebert on 28 Jun 2010 20:59 On Mon, Jun 28, 2010 at 1:08 PM, Edward A. Falk <falk(a)green.rahul.net> wrote: > In article <mailman.2270.1277736664.32709.python-list(a)python.org>, > Stephen Hansen  <me+list/python(a)ixokai.io> wrote: >> >>No one said otherwise, or that print was useless and never used in such >>contexts. > > I was responding to the question "Also, do you use print *that* > much? Really?"  The implication being that in the majority of useful > python programs, you don't really need to use print. > > My answer is yes, I use print in 100% of the scripts I write, including > the large useful ones. > > For this reason alone, python 3 is incompatible with python 2 (which > has already been acknowledged.) > > Until such time as 100% of the systems I might ever want to run my progams > on have python 3 installed, I cannot port my programs over from python 2. There are people working on a workaround for that: http://pypi.python.org/pypi/3to2 Cheers, Chris -- http://blog.rebertia.com
From: geremy condra on 29 Jun 2010 15:21 On Tue, Jun 29, 2010 at 2:56 PM, Edward A. Falk <falk(a)green.rahul.net> wrote: > In article <mailman.2309.1277758252.32709.python-list(a)python.org>, > Stephen Hansen <me+list/python(a)ixokai.io> wrote: >>> >>> Uhmm, just add the parenthesis to your old scripts. You can >>> do that without breaking on 2.x. >> >>Only sort of. But in Python 2.6+, you only need to "from __future__ >>import print_function" to make code work in both 2.x and 3.x (at least >>insofar as the print situation is concerned). > > Nice. Once 100% of the installed base is at 2.6, I'll finally be able > to write code that compatible with 3.0. I can't tell if you're being unpleasant or not. If so, I'd point out that if your user base isn't going to be off of 2.5 for the next couple of years that you have little stake in 3.x one way or the other. If not, fear not- that happy day will come. Geremy Condra
From: Steven D'Aprano on 29 Jun 2010 18:20 On Tue, 29 Jun 2010 18:56:37 +0000, Edward A. Falk wrote: > Nice. Once 100% of the installed base is at 2.6, I'll finally be able > to write code that compatible with 3.0. What's "the installed base"? Machines you control? Then just install 2.6 on your installed base and be done with it. Or even 3.1 (but do yourself a favour and skip 3.0). Client machines? I'm sorry, I simply don't believe any professional can allow your *potential* (your word, from a previous post) user base to dictate terms like that. What are you going to do, stick on 2.5 for the next thirty years years because *one* customer (or potential customer!) refuses to upgrade, even when *everyone else* is up to 3.3 or higher? I've got news for you: there are still machines out there running Python 1.5. Do you write for them? -- Steven
From: Lie Ryan on 30 Jun 2010 08:52
On 06/27/10 11:24, Steven D'Aprano wrote: >> > Producing print function takes a little bit more effort than producing a >> > print statement. > > (1) The main use-cases for print are quick (and usually dirty) scripts, > interactive use, and as a debugging aid. That is precisely how the quick-and-dirty syntax of print statement can be justified. While debugging, you'll need to be able to quickly add and delete prints here and there, and the extra parens can quickly become irritating. |