#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373

    Python 2.4 Alpha 1 released


    The first alpha version of Python 2.4 has been released, so you can try out the new features and help shake out any bugs.

    For me the most exciting new feature is generator expressions - these are similar to list substitutions, but create a generator instead of a list.

    For example, to add up the squares of all the numbers from 1-100 that are divisible by three you can do:

    Code:
    >>> sum( x*x for x in xrange(1, 101) if (x % 3)== 0 )
    112761
    The home page for 2.4 is at http://www.python.org/2.4/

    An overview of the new features is at http://www.python.org/dev/doc/devel/...hatsnew24.html.

    Dave - The Developers' Coach
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    I should just re-emphasise that this is an ALPHA release, so do not use it for any production code. It is also likely that more features will be added before beta, and existing new features may change.

    Dave - The Developers' Coach
  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Wow, this release is looking good so far. But gonna have t wait to see what speed increases we'll get .

    Particually excited about the new decimal type, since i've been confrunted by the problems of floating point arithmetic in the past, so it seems like a great idea (the PEP page is currently unavailable though ). Totaly in agreement with the generator expressions - definatly the major improvment! Dave, I'm assumng by 'list substitutions' you mean 'list comprehensions' right?

    So thats my evening planned out for me already!

    Have fun,

    Mark.
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by netytan
    Dave, I'm assumng by 'list substitutions' you mean 'list comprehensions' right?
    Whoops, yes I did - I am getting befuddled in my old age. Please substitute comprehensions for substitutions for better comprehension.

    Dave - The Developers' Coach
  8. #5
  9. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Ah its not a problem really, i called them list compressions untill Strike pointed it out to me hehe. And its not like its the easiest name to remember in the world .

    Mark.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo