Hacker News new | past | comments | ask | show | jobs | submit login
Python 2.6 Released (python.org)
130 points by ericholscher on Oct 2, 2008 | hide | past | favorite | 31 comments



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


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


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


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+


Remember though, Microsoft does not even support these many of those products anymore: http://support.microsoft.com/gp/lifeselectwin

Even .NET is not available on Windows 98/Me: http://www.microsoft.com/downloads/details.aspx?FamilyId=262...


Windows 2000 still has extended support for another 21 months, so I would definitely be disappointed if it wasn't supported in Python 2.6.

http://support.microsoft.com/lifecycle/?LN=en-ca&x=24...


The fact that MS is keeping Windows 2000 on life support does not mean anyone else should waste their time to support that platform. Running ancient operating systems should come with the expectation of not being able to use new software.


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


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

I think this is a wrong question in this context. Software developer don't recommend OS to people, he delivers software, and the more platforms he supports, the better.

Moreover, if someone has an old box with 98 or NT, what could he do when he don't want to buy a new PC?


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.


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.


Will there be a 3.0 for VMS?


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


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]


If you make applications for windows, then you would understand that people either can't upgrade or won't. Their old machines don't work with newer versions of the OS's.

For web developers this is fine, since they don't need to install programs. However for those of us that need to install programs, it's going to be sticking with python2.5 (or even 2.3 if you want better compatibility).


I would be surprised if 2.6 did _not_ run on WinNT, Win2K or later. I know they dropped support for Win9x variants (Win95, WinME or earlier).

Do you have a reference on Python 2.6 dropping support for win2k?


From here: http://docs.python.org/whatsnew/2.6.html

It is pretty clear that support for WIN2K, at least SP4 is NOT being dropped.

"The support for Windows 95, 98, ME and NT4 has been dropped. Python 2.6 requires at least Windows 2000 SP4."


That rather depends on your definition of portable - I mean, even if they included win98, you'd still likely be stuck with Python 1.5 for Windows CE 1, and no Python for many systems.

That it works on several of the most common, different, platforms in use today, I vote that counts as "portable" - reasonably so.

Another way of looking at it is not how many Win98 systems are there, but that there is (presumably) nobody willing to jump in and argue and offer to support Python 2.6 on Win98 - so how in demand can it be?


python 2.5 works fine with win95 and win98.

We're talking at least 1%-3%1 of machines on the internet here. That's a sizable chunk of people.

based on wc3 stats... which aren't all that representative.


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.


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


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)


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.


  # No. This code:
  @decorate
  def foo(self):
    frobnicate()

  #is exactly equivalent to:
  def foo(self):
    frobnicate()
  foo = decorate(foo)
http://www.python.org/dev/peps/pep-0318/


Yeah, but that's really clunky when you want to do

    @this
    @that
    @the_other
    def foo(self):
        frobnicate()
This is what Java people call "aspect oriented programming" and get all excited about, but to us it's no big deal :-)


Delicious, delicious syntactic sugar :)



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...

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.


  $ 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)


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


It looks like it's coming along on OpenBSD: http://www.nabble.com/UPDATE:-python-2.6,-unbreak-python-2.5...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: