Carsten Haese <[EMAIL PROTECTED]> writes: > On Sun, 2007-08-05 at 23:09 +0000, John J. Lee wrote: >> I just wanted to know: is it easy to make my code so it >> runs on 2.6 and 3.0, without funny stuff like a code translator? > > That depends on your definitions of "easy" and "funny stuff." I'm pretty > sure you'll be able to run the same source code on Python 2.6 and Python > 3.0 without either one breaking, as long as the code is written > sufficiently carefully. You may have to give up some Python 3.0 features > and/or write compatibility shims depending on what features you'll need. > Whether that's acceptable depends on the features you need and how much > "yak shaving" you find acceptable. [...]
If I had wanted to start analysing requirements for some specific project, I'd have gone and done that!-) I was actually interested in the general case (all existing projects), as perhaps you'll see if you read my original post (my followup question you quote above was deliberately blunt for rhetorical let's-move-this-discussion-along purposes -- <sigh> honestly, these literal-minded programmer types, what CAN you do with them?-). Do you *really* think that projects will fall 50-50 into the "yes" and "no" camps, as you seem to imply -- after all, if you thought that one case was more common, why wouldn't you mention which it was? (where "yes" == "feasible to keep a single source code working in both 2.6 and 3.0", and of course it's taken as read that you can do the generalisation to the -- I hope -- obvious continuum of cases "between" "yes" and "no" without our needing to tiresomely spell it out here) I'll also add that previous comments from Guido have implied (to my reading, admittedly without studying them like biblical texts) that the great majority of projects will/should fall pretty squarely, in his judgement, into the "no" camp -- i.e. NOT practical to keep 2.6 and 3.0 comptibility from a single source code without use of a translation tool. Does your "pretty sure"-ness stem from 1) a knowledge of how 3.0 will look when it's done, 2) experience of playing with the Py3k project as it is right now or 3) other? What sort of frequencies does your understanding of Py3k predict for the "yes" and "no" cases? By all means "use your skill and judgement" in answering, rather than asking for clarification -- since that would rather defeat the point of the question. John -- http://mail.python.org/mailman/listinfo/python-list