

Python 2.6 Released - forsaken
http://www.python.org/download/releases/2.6/

======
known
You may download Python 2.x and Python 3.0 books at
<http://www.swaroopch.com/notes/Python>

~~~
silentbicycle
Also, Dive into Python (<http://diveintopython.org/>) is excellent, and the
text is free online.

~~~
tjmc
This is exactly what I've been looking for. Thank you!

------
illume
It drops support for 'older' versions of windows...

Including older versions of win2k, winme, win98 etc. They're not only not
supporting it, but they've removed code for older versions of windows.

So if you want to distribute portable apps, don't use 2.6+

~~~
rbanffy
But who in his right mind would recommend people to use Windows versions prior
to 2000?

~~~
bayareaguy
I would, especially for people who use their computers mostly for business.
Except for USB and PNP support, Windows 2000 is inferior to NT4SP2.

However the Python guys are probably doing the right thing here because the
right approach to making windows based business systems reliable is to disable
everything possible on them, isolate them as much as you can, get things
working and NOT upgrade them unless you absolutely have to.

~~~
briansmith
RE: "Windows 2000 is inferior to NT4SP2"

Windows XP SP2 is basically the minimum version of Windows that you can use
and expect a reasonable user experience. That includes the ability to install
new (recently released) software. If you insist on old operating systems, then
you should expect to run old applicatoins on them.

~~~
rbanffy
Will there be a 3.0 for VMS?

~~~
gaius
I hope so, since it's actually 9 years younger than Unix ;-)

~~~
eru
Robert Metcalf [the inventor of Ethernet] says that if something comes along
to replace Ethernet, it will be called “Ethernet”, so therefore Ethernet will
never die. Unix has already undergone several such transformations.

\-- Ken Thompson

[from <http://www.faqs.org/docs/artu/ch01s02.html>]

------
BrandonM
I still don't fully understand decorators, but it's definitely true that
implementing context managers with decorators is much more succinct and
straightforward than manually writing __enter__ and __exit__ methods. And
context managers are definitely a win.

~~~
kaens
Are decorators more than syntactic sugar for functions that take functions?

~~~
schtog
Useful example, adding memoization without rewriting the actual function, just
add @decoratorname above the function.

class memoize: def __init__(self, function): self.function = function
self.memoized = {}

    
    
        def __call__(self, *args):
            try:
                return self.memoized[args]
            except KeyError:
                self.memoized[args] = self.function(*args)
                return self.memoized[args]
    
    
      @memoize
      def fib(n)

~~~
anamax
2.5 supported function decorators, which this is. (The decorator has always
been a callable, so the above class has always been legal.)

2.6 supports decorators for other things, including classes.

------
nadim
A good read: <http://docs.python.org/whatsnew/2.6.html>

~~~
illume
You'll notice the usual benchmark section is missing from there. The one that
tells you python 2.6 is XXX% faster than python2.5

This is because often 2.6 is slower than 2.5.
[http://mail.python.org/pipermail/python-
dev/2008-September/0...](http://mail.python.org/pipermail/python-
dev/2008-September/082371.html)

Some things are faster, and some are slower. But for the normal benchmarks
mentioned in the release notes (for 2.2, 2.3, 2.4, and 2.5), it's slower
overall.

~~~
llimllib

      $ python2.6 /opt/local/lib/python2.5/test/pystone.py
      Pystone(1.1) time for 50000 passes = 0.867314
      This machine benchmarks at 57649.2 pystones/second
    
      $ python2.5 /opt/local/lib/python2.5/test/pystone.py
      Pystone(1.1) time for 50000 passes = 0.970622
      This machine benchmarks at 51513.4 pystones/second
    

(which is not to say it's always, or even usually faster; just that it's
certainly faster on the standard benchmark)

------
illume
It also doesn't work on FreeBSD/OpenBSD. Though they plan to fix that at
least.

~~~
silentbicycle
It looks like it's coming along on OpenBSD:
[http://www.nabble.com/UPDATE:-python-2.6,-unbreak-
python-2.5...](http://www.nabble.com/UPDATE:-python-2.6,-unbreak-
python-2.5-td19792541.html)

