Thread: Python 2.5
View Single Post
Old Apr 15th, 2006, 10:04 AM   #4
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,013
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Quote:
The net result of the 2.5 optimizations is that Python 2.5 runs the pystone benchmark around XXX% faster than Python 2.4.
Lame... T__T


They also added any() and all(). I still stick with my opinion that it's not only redundant, but slower...

# 2.4 "any"
if True in (0, 1, 2, 3, 4):
    print "Any"

# 2.5 "any"
if any((0, 1, 2, 3, 4)):
    print "Any"

# 2.4 "all"
if not False in (1, 2, 3, 4, 5):
    print "All"

# 2.5 "all"
if all((1, 2, 3, 4, 5)):
    print "All"
Sane is offline   Reply With Quote