Py3K

posted: Tue, 19 Jun 2007 20:17 | filed under: / / / | permalink | Comments: 2

I just had Guido van Rossum's blog pointed out to me, and on it, he's just made an announcement about the next "major" version of Python, for which they're going to do some massive internal changes, and (god forbid), break backward compatability. So, firstly, you may want to read the post, which you can get here and then take a look at some of my thoughts.

  • Firstly, removing "print" as a keyword (and rebirthing it as a function, a la C) is something that should have been done years ago -- truly it is an abomination and deserves to die a slow and painful death.
  • Many functions useful to the building of for loops have had their entire internal structure revamped; instead of building lists and iterating over these lists, they simply use an iteration function -- from an algorithmist's point of view, this is truly wonderful (technical details follow). The current python model implies that to initiate a for loop, you would need to go through an O(n)-time process of constructing a list, and then use that list to get an iteration variable (which has an O(n) space overhead) -- clearly not very efficient. The new version of range acts like Python's xrange(), which simply uses an iteration function. The time and memory increase will be enourmous.
  • Division (where necessary) is now floating-point by default; so 1/2 will now equal 0.5 instead of 0. From a teaching point of view, it's going to be wonderful.
  • A Java-like Class hierarchy now exists, which, despite my great hatred of Java, is one of its OO-related strong points.
  • So, all in all, I think Python 3K is going to be very interesting, indeed, and am looking forward to trying out some of the alphas when they're out (August)

    Doctor Who

    posted: Wed, 06 Jun 2007 10:22 | filed under: / / | permalink | Comments: 0

    Oh, and I had the following picture brought to my attention:

    Who is the person on the right? You'll have to watch the latest two eps of Doctor Who to find out. And thanks to Nic Wittison for making the composite.

    General Update

    posted: Wed, 06 Jun 2007 09:56 | filed under: / / / | permalink | Comments: 0

    Well, it appears as though I've been neglecting this place for quite some time, so I suppose I should update you a bit on what's been going on in the land of me recently

    Firstly, my first "proper" semester at Uni has just finished (with the exception of exams), and things seem to be going well. So, I think I should comment on the subjects I did

    In other related news, I got invited to train with the School of Computing's ACM ICPC team, which is great, as it means I can extend myself a bit. To that end, I've enrolled in a Winter School unit designed as preparation for that sort of stuff, which, aside from placing me in Launceston for a week, and making me do an exam on my birthday, looks like it will be really good fun.

    Well, that's about it for now, I expect that I'll be making regular updates over the exam period. Bye!

    ... At least they know where they're going :)

    posted: Wed, 06 Jun 2007 08:53 | filed under: / / / | permalink | Comments: 0

    chris@Petya:~/Desktop$ python
    Python 2.4.4 (#2, Apr 26 2007, 00:02:45)
    [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from __future__ import braces
      File "", line 1
    SyntaxError: not a chance