Thursday, December 4

Python 3.0

Python 3.0 (also known as Python 3000) has been released yesterday, so I thought I'd give it a try. It turns out that a recent release candidate is in official Ubuntu 8.10 (intrepid) repositories, so I did not even need to compile anything: apt-get install python3.0 and we're done. You may want to read the summary of changes from Python 2 beforehand.

Here's a quick demo of unicode identifiers:

>>> 二 = 2
>>> 四 = 二 + 二
>>> 四
4
>>> import math
>>> π = math.pi
>>> α = π/3
>>> math.sin(α)
0.8660254037844386

This isn't quite APL yet, but we are getting closer!

7 comments:

Anonymous said...

great potential for obfuscation. who will need perl any more?

uoɥʇʎd for the win

ssam said...

great potential for obfuscation. who will need perl any more?

uoɥʇʎd for the win

Ludvig Ericson said...
This comment has been removed by the author.
Ludvig Ericson said...

import swedish

för objekt i sekvens:
....försök:
........objekt.metod(argument)
....undantag AttributFel:
........pass

The horror. Update: I know it's only for identifiers, but what next?

Domas said...

It is a great feature for education. Now Lithuanians can code like this:

if žolė.spalva is žalia:
..paleisk_karvę
else:
..parvesk_karvę

While writing this I thought that with translatable keywords Python code could be read as a poem in any language.

caiyan said...

kate spade outlet
michael kors outlet
yeezy 350 boost
swarovski crystal
ray ban sunglasses outlet
true religion outlet
ray ban sunglasses
toms outlet
chaussures louboutin
coach outlet store
0510shizhong

eric yao said...

Louis Vuitton Michael Kors Outlet North Face Outlet North Face Outlet Timberland Outlet Moncler Outlet Coach Factory Ray Ban Outlet Christian Louboutin Shoes