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!
Comments:
Links to this post:
<< Home
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?
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?
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.
Post a Comment
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.
Links to this post:
<< Home


