The Artima Developer Community
Sponsored Link

Python Buzz Forum
Exciting stuff in Python 2.5

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Simon Willison

Posts: 282
Nickname: simonw
Registered: Jun, 2003

Simon Willison is a web technology enthusiast studying for a Computer Science degree at Bath Uni, UK
Exciting stuff in Python 2.5 Posted: Apr 6, 2006 2:55 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Simon Willison.
Original Post: Exciting stuff in Python 2.5
Feed Title: Simon Willison: Python
Feed URL: http://simon.incutio.com/syndicate/python/rss1.0
Feed Description: Simon Willison's Python cateory
Latest Python Buzz Posts
Latest Python Buzz Posts by Simon Willison
Latest Posts From Simon Willison: Python

Advertisement

Python 2.5 alpha 1 is out, and as usual the What's New in Python 2.5 document provides a pleasant overview of the new features. There are some real treats in there. While I'm hoping that the syntax for conditional expressions will grow on me, I'm looking forward to Partial function application becoming a common Python idiom. Relative imports are going to make Django applications a lot easier to redistribute, and I can't wait to see all the crazy hacks that result from the introduction of coroutines.

I've seen David Heinemeier Hansson speak a few times, and he often uses ActiveRecord's transaction support to illustrate the elegance that well-written Ruby has to offer:

Account.transaction(account1, account2) do
  account1.withdraw(100)
  account2.deposit(100)
end

Here a Ruby block is being used as syntax for a database transaction, guaranteeing that some code will be run before and after the withdraw and deposit lines. The new with statement makes something similar possible with an imaginary Python ORM:

with Account.transaction(account1, account2):
    account1.withdraw(100)
    account2.deposit(100)

The highlight of the release might well be the modules that have been added to the standard library - tucked away in section 13 of the document. ctypes, ElementTree, a new hashlib with support for SHA-224 through 512 and sqlite3 (a renamed pysqlite) are all included. ctypes is particularly interesting as it lets you call functions in compiled DLLs and shared libraries without having to compile a Python wrapper.

The final Python 2.5 release appears to be scheduled for June-July this year, which should give Apple ample time to incorporate it in to OS X Leopard.

Read: Exciting stuff in Python 2.5

Topic: Familiar Previous Topic   Next Topic Topic: Quick Ruby on Rails 1.1 Summary

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use