Python 3
Russel Winder
russel at russel.org.uk
Wed Jun 23 07:09:32 BST 2010
On Wed, 2010-06-23 at 17:55 +1200, Robert Collins wrote:
[ . . . ]
> > except Foo , e : -> except Foo as e :
>
> working$ python2.5
> Python 2.5.5 (r255:77872, Jan 31 2010, 21:34:29)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> try:
> ... 1/0
> ... except Exception as e:
> <stdin>:3: Warning: 'as' will become a reserved keyword in Python 2.6
> File "<stdin>", line 3
> except Exception as e:
> ^
> SyntaxError: invalid syntax
Indeed, and true for all pre2.6 Pythons. All the 2.x -> 3.1 guides
effectively assume 2.6 as a floor. I have the luxury of treating 2.6 as
a floor and tend to forget sometimes the hassles of using anything that
doesn't have the multiprocessing package as standard (*).
Sorry for slipping in a googly (**).
(*) Insert long spiel about multicore, processor bound computing, use of
Python, the GIL, process-orientation, and CSP.
(**) Cricket metaphor nothing to do with anything else that might have
come to mind.
--
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/7dda0fec/attachment.pgp
More information about the bazaar
mailing list