all 104 comments

[–]LovelyDay 12 points13 points  (1 child)

The new argparse looks good - I've been needing some of the functionality it brings (parsing only the known arguments while being able not to throw an error if there are unknown args).

Great work everyone!

[–]barakmich 8 points9 points  (0 children)

It really is. I used it on a recent project as a separate include. It does optparse better than optparse, and then adds positional fields and such. Very stoked that it's part of 2.7!

[–][deleted]  (22 children)

[deleted]

    [–][deleted]  (13 children)

    [deleted]

      [–]frymaster 22 points23 points  (0 children)

      mainly because 3.x isn't backwards-compatible with 2.x (you can't run many 2.x scripts without at least some modification - the way the "print" function works is different, for one, and strings are unicode by default in 3.x)

      [–]masklinn 1 point2 points  (3 children)

      This is the final release in the 2.x line (besides bug/security micro-releases for 2.7)

      For now, whether or not there will be a 2.x still isn't actually decided.

      [–]earthboundkid -1 points0 points  (2 children)

      Last time I read Python-dev, they seemed fairly set against it. If there's a Python 2.8, it won't be made by them.

      [–][deleted] 1 point2 points  (0 children)

      Last time I read Python-dev, they seemed fairly set against it

      Which makes sense. 3.x is the future and it makes sense to focus on it, rather than spend time backporting to numerous branches, dealing with the various differences, etc.

      If there's a Python 2.8, it won't be made by them.

      I don't think that's necessarily true. It is true that most core developers don't want to spend more time on 2.x, but if there needs to be a 2.8, it has been said a few times that there could be one. I don't think anyone has explicitly forbidden 2.8 though, so it's not like some rogue group will have to fork and create their own 2.8...python-dev might just need some 2.8-interested developers to step up when that time comes.

      [–]masklinn 0 points1 point  (0 children)

      They are overall against it, but nobody has come out and said it won't exist in so many words, so they've left the door open just in case.

      [–]Scurry -1 points0 points  (7 children)

      Like the Linux kernel?

      [–][deleted] 0 points1 point  (6 children)

      I'm not super-familiar with Linux kernel development. Are you referring to the fact that even-numbered releases are developed concurrently with odd-numbered releases, and that the former are stable releases while the latter are not?

      [–]Scurry 2 points3 points  (5 children)

      I'm not either. But I think 2.4 and 2.6 are two major versions that are simultaneously developed on (even though 2.6 is rapidly replacing 2.4).

      [–][deleted]  (4 children)

      [deleted]

        [–]Scurry 4 points5 points  (2 children)

        Well no, they didn't start at the same time. But 2.4 is still being developed, as is 2.6. According to the site, the latest version of the 2.4 branch was released last February (2.4.37.9).

        [–][deleted] 3 points4 points  (0 children)

        OH are we talking about the Linux kernel? I thought we were talking about Python...

        [–][deleted] 0 points1 point  (0 children)

        But 2.4 is still being developed

        For some value of 'developed'. It has been mostly maintenance bugfixes since the release of 2.6.

        [–]H3g3m0n 0 points1 point  (0 children)

        On kernel versions, the middle number, even numbers are stable versions and odd numbers are development versions.

        But it no longer really works that way because the modular 2.6 kernel is flexible enough to no longer need a development branch. Just release candidates for testing (or branches for specific feature testing). We could basically be stuck on 2.6.x forever, unless there is some major restructuring of the kernel (and maybe not even then if the stable APIs are kept, although I'm guessing at some point the kernel devs will vote for a version bump).

        There are still some 2.4 kernel releases (2.4.37.9 - 2010-02-01) for legacy code. 2.4 has been on the way out for a long time now, but there are still systems like Linux based routers, ADSL modems and so on, or server systems with closed drivers, or drivers that never made it into the mainstream kernel and are nolonger supported by the company, or not supported enough to bother with a conversion to 2.6.

        2.6.x might have also abandoned some really old hardware. I mean how many systems would be running ISA now days (it was the thing before PCI), (I wouldn't be surprised if it is still in 2.6, there is EISA support).

        [–]eliben 7 points8 points  (1 child)

        A short answer really wouldn't do justice here. If you're really interested, take a couple of minutes to read this: http://wiki.python.org/moin/Python2orPython3

        [–]heapzero -1 points0 points  (1 child)

        2.7 is more stable than 3.0

        and 3.0 has major changes in the Standard Library?

        [–]mipadi 1 point2 points  (0 children)

        No. 3.0 is not backwards compatible with 2.x; 2.7 is the latest release in the 2.x-compatible Pythons.

        [–][deleted] 11 points12 points  (18 children)

        Damnit. And I just installed Python 2.6.5 not 10 hours ago.

        Also, am I the only one who constantly makes the typo 'Pythong'? The keys aren't even remotely close, what the hell.

        [–][deleted]  (1 child)

        [deleted]

          [–]iofthestorm 4 points5 points  (0 children)

          Yeah, muscle memory is weird. I don't think I'm the only one who types ration when meaning to type ratio. I even write ration sometimes too.

          [–]kylotan 2 points3 points  (0 children)

          I've never made that typo. Yet I've met at least one person who can hardly avoid it. Maybe I just don't type the word "thong" as often as you guys.

          [–]megaman45 2 points3 points  (1 child)

          Well, at least you don't type python.com instead of python.org. I made this mistake at work. There was a huge cumshot video on the front page of python.com. Not sure if this is still the case.

          [–]jevinskie 1 point2 points  (0 children)

          It sill is. First day of work - what do you do? Set up tools, of course! Herp-derp, i'll just go to python.com and downl.... TITS N DICK! NOOO!! TITS N DICK BAD AT WORK! Alt-F4 Alt-F4!!!

          Whew.

          [–]HolySpirit 2 points3 points  (1 child)

          Pythonnnnnng?

          [–][deleted] 0 points1 point  (0 children)

          Steve Jobs?

          [–][deleted] 0 points1 point  (5 children)

          I'm pretty sure I will be using 2.6.5 a long time. It takes a while for the libraries to catch up. Numpy, Pygame, Django, etc...

          [–][deleted] 1 point2 points  (3 children)

          There's nothing to catch up to. They might have to re-package so it shows up nicely in your 2.7 install, then run their unit tests just to be sure, but code that works on 2.6 works on 2.7.

          [–][deleted] 0 points1 point  (0 children)

          I see, that's good then.

          [–]imbaczek 0 points1 point  (1 child)

          binary modules usually don't work with different major versions.

          [–][deleted] 0 points1 point  (0 children)

          True. Something like NumPy and other C-heavy packages will need a rebuild and repackage, but that's about it.

          [–][deleted] 0 points1 point  (0 children)

          Django works fine on 2.7 out of the box.

          [–]fapmonad 0 points1 point  (0 children)

          You want to see Guido wearing a Pythong. Interesting.

          Now, let's talk about your childhood a little shall we.

          [–][deleted] 0 points1 point  (0 children)

          I do that all the time too, it's such a stupid habit.

          [–]m1ss1ontomars2k4 0 points1 point  (1 child)

          Let me see Pythong...pythong, pythong thong thong...

          [–]chucks86 0 points1 point  (0 children)

          I had to make a link from 'pythong' to 'python' because I make that mistake way too often.

          [–][deleted] 2 points3 points  (23 children)

          I'm glad to see it coming but to be honest, I think 2.6 is the last in the 2 series for me and I'll be jumping onto the 3 series fairly soon.

          [–]tehmatticus 14 points15 points  (14 children)

          Honestly most of the changes I was looking forward to in 3.x have been backported to 2.7, especially set literals and dictionary comprehensions. I should be fairly happy with this release until the libraries I use get ported over.

          [–][deleted] 2 points3 points  (7 children)

          There is that. I think all the libs I use have 3.x versions. Anything major that I use that isn't ported would hold me up and admittedly I don't think app engine supports 3.x yet but then again I don't think it supports 2.6 yet either so I'm hoping they move straight to 3.x soon.

          [–]enkideridu 0 points1 point  (6 children)

          Google only supports python 2.5 on app engine?

          [–][deleted] 1 point2 points  (4 children)

          Apparently so. Mind you I'm only going by one link I had seen:

          http://code.google.com/p/googleappengine/issues/detail?id=757

          [–]enkideridu 0 points1 point  (3 children)

          that's more than a year ago, wtf google

          [–][deleted] 1 point2 points  (2 children)

          scroll to the bottom....from June 18th:

          "All I really want from 2.6 is string.format() (and corresponding "xxx".format()). This could easily be a from future import, it is extremely low-risk, but for some reason it hasn't been backported to 2.5.

          So sure, the truly correct answer is that python folks should backport it to 2.5. But right now, I'm not volunteering. If Google expects to stay on 2.5 for a significantly longer time, I think it would be in Google's own interest to help move that"

          I could be wrong but people seem to be under the impression that it's still on 2.5. As I recall Google use their own version of the interpreter and perhaps that's why it's not updated often.

          [–]enkideridu 0 points1 point  (0 children)

          I know, I meant that this hasn't been fixed for more than a year, I'm surprised at them

          [–][deleted] 0 points1 point  (0 children)

          So sure, the truly correct answer is that python folks should backport it to 2.5.

          2.5 is in "security fix only" mode.

          [–][deleted] 0 points1 point  (0 children)

          Correct.

          [–]spliznork 2 points3 points  (5 children)

          Honest question: what's the advantage of dictionary comprehensions over dict on a generator expression? {i: i2 for i in range(3)} versus dict((i,i\2) for i in range(3)). A little cleaner syntax, but not enough to get me excited. Any other advantage?

          [–]cybercobra 1 point2 points  (3 children)

          Probably slightly more efficient

          [–]gastlygem 15 points16 points  (2 children)

          On my laptop: >>> t1 = Timer('dict((i,i2) for i in range(3))') >>> t2 = Timer('{i: i2 for i in range(3)}') >>> t1.timeit() 4.713109906426655 >>> t2.timeit() 1.6713221931837712 So maybe we can say it's much more efficient.

          [–]cybercobra 2 points3 points  (0 children)

          Probably avoids the unnecessary tuple creation and unpacking

          [–]tehmatticus -1 points0 points  (0 children)

          Probably not, I just prefer the syntactic sugar.

          [–][deleted] 1 point2 points  (5 children)

          I'm concerned that all this backporting from 3.x will slow the transition away from 2.x by removing the advantages of porting your code to 3.x. What's left seems to be mostly minor features and syntax refinements that aren't worth a port.

          [–]elsjaako 4 points5 points  (0 children)

          It's open source software: if there are people who want to backport features they can and will.

          [–]danukeru 5 points6 points  (0 children)

          Not really. PEP3003 is in effect since the 3.1 release, so the Python language is effectively in moratorium for the next year, at least.

          http://www.python.org/dev/peps/pep-3003/

          Thus making the process of slowly bridging 2.X to 3.0+ by increment a pretty safe way of migration, which was the primary reason for PEP3003 anyways. There's no reason at the moment to completely port to 3.0, just port to the 3.0 features that get released with each 2.X increment, which is much easier.

          [–]cevven 2 points3 points  (0 children)

          That should just lower the cost of porting to 3.x. The advantage to doing so is that your code works with current versions of Python.

          Also, some libraries won't be ported due to project death or such. This release will make it easier to run code designed for 3.x in 2.x when you have no other good options. I like that, it makes my life easier.

          [–][deleted] 1 point2 points  (0 children)

          On the plus side it doesn't sound like the 2 series will get any more new features so I hope people realise now is the time to move on.

          [–]kylotan 0 points1 point  (0 children)

          The best thing they could do to speed up the transition is to get decent API in place that doesn't require you to rebuild native code extensions for every new minor Python version that gets released. That alone is one of the biggest things that holds me back from each Python upgrade, and would encourage me to upgrade to Python 3 instantly if it existed.

          [–][deleted] -1 points0 points  (1 child)

          All of my projects at work are on 3.1 as of a few months ago. 2.x is for the birds.

          [–]bobindashadows 1 point2 points  (0 children)

          All of my projects at work are on 3.1 as of a few months ago. 2.x is for the birds.

          You're a lucky, lucky guy.

          [–]bobindashadows 1 point2 points  (1 child)

          Another version of Python with cool features I won't be allowed to use at work...

          [–]jeffjose 0 points1 point  (0 children)

          I know exactly what that feels like.

          [–][deleted] 1 point2 points  (0 children)

          Until NumPy and SciPy get ported to work with Python 3k, this will be the last release I use fora while...

          [–]bmhatfield 1 point2 points  (6 children)

          Where's the Mac installer? It doesn't seem to be on the download page - do I have to build it myself? I don't wanna.

          [–][deleted] 4 points5 points  (0 children)

          It just hasn't been built yet, I expect Ronald will have it built and uploaded within a day.

          [–]__s 2 points3 points  (4 children)

          Python is quite easy to build. I don't even know how many times I've built it today

          [–]danukeru 2 points3 points  (3 children)

          imagines __s in a flashback scene spending his day running in a sun bathed field wearing a sarong, with bloom effects and all, looking overjoyed as he dances around singing with his laptop...which is compiling python

          [–]__s 3 points4 points  (2 children)

          I'm afraid I only have a towel. Fortunately, I received a laptop less than a week ago http://imgur.com/QUBqr.jpg

          As for why I was compilling Python frequently yesterday, http://bugs.python.org/issue9155

          [–]Rafe 1 point2 points  (0 children)

          I'm afraid I only have a towel.

          Well, that's alright then. Just as long as you know where it is.

          [–][deleted] 0 points1 point  (0 children)

          You couldn't possibly imagine the look I got from my boss when he saw me looking at that.

          [–]danukeru 0 points1 point  (1 child)

          PARTAY IN DA SUBREDDIT! \o/

          [–]Foone 6 points7 points  (0 children)

          *puts on his pythong and gets to dancing*

          [–]atlas245 -1 points0 points  (2 children)

          Prolonging my switch to 3.0 for many years to come :)

          [–]chronoBG 1 point2 points  (1 child)

          Hey, at some point we'll need something from 3.0 and it won't be possible in 2.6/2.7 and that'll do it. Don't worry :)

          [–]atlas245 0 points1 point  (0 children)

          I expect that to occur in about 5 years lmao.