On 9/10/07, Hermann Himmelbauer <[EMAIL PROTECTED]> wrote: > Am Sonntag, 9. September 2007 17:34 schrieb Lennart Regebro: > > A bit late post, but here is my thoughts on the subject. > > I'm hoping that Guido will see the errors of his ways, and introduce a > > Python 2.7 that has more forwards compatibility than what has been > > promised for 2.6, so that there can be a useable overlap between > > Python 2.7 and 3.0. Maybe a 3.1 with some more backwards compatibility > > will be needed to, I don't know. > > I share many of your fears, but I personally don't see how Python 3 and 2 > could be possibly compatible. There quite some basic changes, e.g. the format > specifier (print "Hello %s" % "World") does not exist any more, strings are > unicode etc.
2.6 will already introduce some forward compatibility and the things you menation are easy to make forward compatible. All you need is a >>> from __forward__ import print And then you can do >>> print("Ladida") in 2.6. This goes for some of the other things too. The unicode thingy is not a problem either. Let both 2.x and 3.x support u'' and b'', but make strings default to b'' in 2.x and u'' in 3.x. To make sure it works in both versions, then just have u'' everywhere! There are some things that are not easy, but I haven't yet seen anything except for some quite advance features, that are not possible to introduce forward compatibility for. However, Guido has shown no interest in actually introducing that much forward compatibility. Note that this compatibility will still require you to change to code so it works under 3.x. But do it right, and it will still work under 2.x as well. This means that you can convert your Zope product written for Python 2.x and fix it so it works under both, in 90% of the cases, at least. I have yet to be convinced that this is impossible. > My hope is that the code can be made compatible in a way, so that the > resulting code of the Python 2->3 conversion is running. There would be 4 > versions available, true, but the Python3 versions could be generated > automatically. That's never going to work, because there are too many things that can't be converted automatically. The only way to make the conversion work is to first make sure there are almost 100% test coverage. And that is not going to happen. On 9/11/07, Martijn Faassen <[EMAIL PROTECTED]> wrote: > When I told Guido we still have a Zope 2 and a Zope 3, he said we should > avoid this situation with Python. Well, then. Then we will need more forward compatibility in 2.x. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com