Python 3
Russel Winder
russel at russel.org.uk
Wed Jun 23 07:00:43 BST 2010
Martin,
On Wed, 2010-06-23 at 11:01 +1000, Martin Pool wrote:
> On the other hand, Robert's patch has things like
>
> -except locale.Error, e:
> +except locale.Error:
> + e = sys.exc_info()[1]
>
> which is clearly worse, and clearly also the kind of thing that can be
> easily mechanically translated by 2to3. I wouldn't like to see that
> kind of thing merged until we've decided we really want a single
> codebase that works on both with no translation.
I think this post and all subsequent issues regarding this code fragment
are based on the wrong assumption and so much of it is effectively
wrong. The recommended transformation is:
except locale.Error , e :
->
except locale.Error as e :
which is clearly more or less a no-op. If 2-3 generates anything else
then it is broken.
Clearly the issue of supporting pre-2.6 Python have an impact here but
only if you are trying to use a single code base to deal with Pythons
1.5 -> 2.6. The SCons folk seem to be the real masters at doing this,
but they have just given up on Pythons 1.5, 2.0->2.3 and now have 2.4 as
a floor. The issue of Python 3 is now arising but not being addressed
just yet. They do have a very interesting approach to using a single
code base for all supported Pythons, that might be useful input to the
debate -- or not. Just a thought.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at russel.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100623/1e18ded7/attachment.pgp
More information about the bazaar
mailing list