The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Python Programming
|
Python 2.4 Alpha 1 released
Discuss Python 2.4 Alpha 1 released in the Python Programming forum on Dev Shed. Python 2.4 Alpha 1 released Python Programming forum discussing coding techniques, tips and tricks, and Zope related information. Python was designed from the ground up to be a completely object-oriented programming language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 9th, 2004, 11:36 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
|
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...whatsnew24.html.
Dave - The Developers' Coach
|

July 9th, 2004, 11:54 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
|
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
|

July 10th, 2004, 01:18 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
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
|

July 10th, 2004, 04:25 AM
|
|
Contributing User
|
|
Join Date: Feb 2004
Location: London, England
|
|
Quote: | 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
|

July 10th, 2004, 04:46 AM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|