Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Python 3.3.0 Released

Soulskill posted about 2 years ago | from the onward-and-upward dept.

Python 131

An anonymous reader writes "After just over a month of release candidates, the final version of Python 3.3 launched today. This version includes new syntax, including the yield from expression for generator delegation; new library modules, including fault handler (for debugging crashes), ipaddress, and lzma (for data compression using the XZ/LZMA algorithm); a reworked OS and I/O exception hierarchy; the venv module for programmatic access to Python virtual environments; and a host of API changes. The full list of features and the change log are both available."

cancel ×

131 comments

Sorry! There are no comments related to the filter you selected.

Undisclosed new feature (0)

Anonymous Coward | about 2 years ago | (#41498961)

* Even slower than before, however impossible that may seem

Re:Undisclosed new feature (1)

Zapotek (1032314) | about 2 years ago | (#41499189)

The size of your need for attention is disturbing.

PS. I'm not a Python fan, I actually dislike it.

Re:Undisclosed new feature (3, Informative)

Kiwikwi (2734467) | about 2 years ago | (#41500755)

In case anyone is wondering, many programs should perform better under Python 3.3 than under 3.2, due to the new way of storing Unicode strings [python.org] :

The memory usage of Python 3.3 is two to three times smaller than Python 3.2, and a little bit better than Python 2.7, on a Django benchmark.

Benchmarks that focus on certain types of string-operations have seen slowdowns, but real-world applications (such as Django web applications) should benefit from this change. (And real-world applications that perform intensive and performance critical string manipulations should use PyPy.)

Python 3 and its use (1)

IllusionalForce (1830532) | about 2 years ago | (#41498975)

Is anything major using Python 3 already? Most distributions still use Python 2 as their default Python interpreter, the big libs (twisted and Django come to mind) aren't ported yet. Is there any reason to use it?

Re:Python 3 and its use (2, Informative)

wisty (1335733) | about 2 years ago | (#41499029)

I think Ubuntu is going Python 3. Most of the scientific stuff has been ported (though the Matplotlib port may be immature).

Bottle, Pyramid, and Tornado are all ported. Just not Django.

It's probably now at the point where new projects are better off starting with Python 3, to ease the pain of upgrading later, unless there's a library they really need. Starting with a mature (but depreciated) platform is not a great idea.

Re:Python 3 and its use (5, Funny)

wonkey_monkey (2592601) | about 2 years ago | (#41499081)

Bottle, Pyramid, and Tornado are all ported. Just not Django.

Ah, I remember when you stood a decent chance of guessing what something did from its name. And all this was cherry orchards, far as the eye could see.

Re:Python 3 and its use (1)

Anonymous Coward | about 2 years ago | (#41499209)

Mercedes-Benz SLK, Dodge Viper, Apple iPod, McDonald's, Intel Pentium, Linux, BSD, American Telephone & Telegraph System 5, Netscape Navigator, Sun Solaris, Sun Java, C, ...

Re:Python 3 and its use (2, Interesting)

CastrTroy (595695) | about 2 years ago | (#41499239)

Yeah, if you look at all the old programs, you can always tell what they do. Excel, Access, Gimp, Firefox, Quarkxpress. Sure there's some good names out there like Photoshop, Word, Internet Explorer, WordPerfect and CorelDraw!, but I don't think it was ever the case where the function of most programs could be identified by their name. All the obvious names get taken early on, and you're left with having to give your program a meaningless name so that you don't sound like a copycat, and so you can distinguish your program from all the others out there.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41499353)

Excel is a test cheating program?

Access is a password protection program?

Gimp is a program for cripples?

Firefox is a game where you fire foxes out of cannons?

Quark is a scientific program?

Re:Python 3 and its use (5, Funny)

larry bagina (561269) | about 2 years ago | (#41499723)

Gimp is a program for cripples?

Ok, that one is self explanatory.

Re:Python 3 and its use (1)

Max_W (812974) | about 2 years ago | (#41501077)

Actually GIMP 2.8.2 is quite good. I work with it almost daily.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500923)

Sarcasm is a thing you've heard of?

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41499471)

Quark XPress isn't that hard to guess once you realize Quark is the just the manufacturer's name. It's a home printing press, or (puts on sunglasses) an express press.

Also, GIMP is the GNU Image Manipulation Program, which is pretty damn straightforward.

Re:Python 3 and its use (1)

Zero__Kelvin (151819) | about 2 years ago | (#41499705)

I thought Word [urbandictionary.com] was a program for communication among Ghetto slangsters.

Re:Python 3 and its use (1)

jones_supa (887896) | about 2 years ago | (#41500403)

It is!

It should be obvious even by looking at the box [flickr.com] .

Re:Python 3 and its use (1)

obarel (670863) | about 2 years ago | (#41500483)

All those cherries ended up in the CherryPy.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41499091)

I think Ubuntu is going Python 3.

This is a big step towards python 3, and possibly one that will not bode well for ubuntu in the short term. As much as I would like to move to python3, there are still some important libraries that I use that don't support it yet. (django is not one of them)

Re:Python 3 and its use (1)

Anonymous Coward | about 2 years ago | (#41501693)

Python 2.7 is not going anywhere in Ubuntu. If you want to continue to use it, please do!

The movement toward Python 3 in Ubuntu will be mostly transparent to users. Users generally don't care what language their desktop applications are written in, so the fact that some will now be in Python 3 instead of Python 2 should have no effect on them, except perhaps the *lack* of dreaded UnicodeErrors in non-English locales, since we can now take advantage of Python 3's clear distinction between bytes and strings (unlike in Python 2).

Most libraries will continue to be available for Python 2, but now they will also be available for Python 3, if you want it. An example is dbus. You can write dbus clients and servers in either Python 2 or 3, and this goes for more libraries (and growing).

I agree that there are still many libraries that need porting. An example is Xapian (which turns out to be a tough one, more due to SWIG and C++ than Python 3). oauth is another one because the most popular Python oauth library has been abandoned upstream for ages. Big frameworks like Twisted, Django, and Zope are getting there, but of course, the higher up the food chain you go, the longer it will take to port.

-Barry

Re:Python 3 and its use (5, Insightful)

melonman (608440) | about 2 years ago | (#41499183)

"It's probably now at the point where new projects are better off starting with Python 3, to ease the pain of upgrading later, unless there's a library they really need. Starting with a mature (but depreciated) platform is not a great idea."

Unless you want to use Python on Google App Engine, where Python 2.7 is what you get. And given that Guido himself works for Google on this project, that's not exactly encouraging.

Or unless you want a Python app to work out of the box on, well, just about anything, but OSX is the example that bit me.

I remember discussing Python 3 on /. when it came out. The decision not to even try to ensure backwards compatibility struck me as disastrous. The response was "No, because Python will never have a cruft problem because we are not Perl coders", or something like that. Many years on, I still think it was disastrous. Python now has a bigger legacy code problem than Perl - seen much Perl 4 recently? - precisely because the upgrade path is such a pain.

Killing Python 2 is going to be like killing IE6 and Windows XP - a noble goal that turns out to take decades. And it's a totally self-inflicted wound by the Python community.

Re:Python 3 and its use (4, Informative)

buchner.johannes (1139593) | about 2 years ago | (#41499207)

Killing Python 2 is going to be like killing IE6 and Windows XP - a noble goal that turns out to take decades. And it's a totally self-inflicted wound by the Python community.

Except nobody intends to kill Python 2 anytime soon. When Python 3 was shaped, it was everyones plan to have Python 2 + 3 alongside for a long time.

Re:Python 3 and its use (5, Informative)

csumpi (2258986) | about 2 years ago | (#41499309)

That might be the case, except:

#!/bin/env python

might give you python2 or python3. And there's no standardized way to ask for python2 or python3.

Re:Python 3 and its use (1)

marcosdumay (620877) | about 2 years ago | (#41499411)

Well, semms like we need to standardize that. Virtualenv makes it less of a problem, but does not solve it. Also, you can make code that run on both versions. It is harder, but you can.

Python3 is way better than Python2, and everybody seems to agree on that. Every big project out there either supports or is adding support for it, so killing Python2 may be much easier than IE6.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41499829)

The obvious way being
#!/usr/bin/env python2

Unfortunately doesn't work everywhere.

Re:Python 3 and its use (2)

Zero__Kelvin (151819) | about 2 years ago | (#41499887)

Sure there is: #!/bin/python3

Re:Python 3 and its use (5, Informative)

lattyware (934246) | about 2 years ago | (#41500039)

You say that, PEP 394 -- The "python" Command on Unix-Like Systems [python.org] clearly defines this:

This PEP provides a convention to ensure that Python scripts can continue to be portable across *nix systems, regardless of the default version of the Python interpreter (i.e. the version invoked by the python command).

  • python2 will refer to some version of Python 2.x
  • python3 will refer to some version of Python 3.x
  • python should refer to the same target as python2 but may refer to python3 on some bleeding edge distributions

Pretty clear and standardised to me.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500615)

Absolutely right; certainly for Debian and Ubuntu, /usr/bin/python will always be Python 2 and /usr/bin/python3 will be Python 3 (the latest default version, currently 3.2 in Wheezy and Quantal). I can't speak for Fedora/RH, but I think other than some "bleeding edge distros" this will almost always be the case.

-Barry

Re:Python 3 and its use (1)

HiThere (15173) | about 2 years ago | (#41501247)

Don't say always. At some point Python2 will be deprecated. Possibly not for 5 years or more, but at some point. It has been announced that python2.7 will be the last release of the Python2 series. Well, they may change their minds, and go to python2.8, but that's not the current plan.

So Python2 is stable, and will endure for quite awhile. But not forever. If you're planning for the next decade, you should use Python3. Don't plan for longer. C might be stable in that long a run, but don't count on it.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41502833)

There are some whose long term plans are for Python 2.7.9

But planning for a Python 2.8? That would be silly.

Re:Python 3 and its use (1)

thetoadwarrior (1268702) | about 2 years ago | (#41499527)

It gets no new features and only security bug fixes. It's obvious they're only supporting it to not piss off people not that they intend for it to live forever along side python 3.

Re:Python 3 and its use (1)

Anonymous Coward | about 2 years ago | (#41500595)

Python 3 is not really a different language than Python 2. Yes, there are some backward incompatibilities, but I think their impact on Python programmers has been way overblown. Through experience, most of us doing primarily Python 3 work know that it is usually rather easy to write code that works in both Python 2 and Python 3. If the code has a very clear model of what are byte and what are strings (the hardest part about porting, which Python 2 let you be sloppy about), then it is generally very easy to port to Python 3 or add Python 3 support. Once you start writing the bulk of your code in Python 3, Python 2 just seems like an increasingly creaky old version. :) The new features in Python 3.3 are amazing.

Python 2.7 will live on for a long time, officially much longer than the normal Python version lifetime. If you must continue to use Python 2, please do! But I think it will become increasingly clear that Python 3 has so many advantages, it only makes sense to switch to it.

Guido was always very clear in his thinking that a widespread transition to Python 3 would take 5 years, and given that Python 3.0 was released in December 2008, I think we're on just the right path for Python 3.

-Barry

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500519)

In Ubuntu, our immediate goal is to port everything that comes on the installation media for the desktop distro to Python 3. We made great progress in 12.10 and will continue the effort in 13.04. Big projects like Twisted are underway through a combination of upstream and contractors, so while we will probably not have all of Twisted ported for 13.04, big parts of it should be, at least the parts that various desktop components depend on. Please note that Python 2 is not going anywhere. Tons of stuff still depend on it, and will for the foreseeable future. /usr/bin/python will still be Python 2 and it will still be in main. /usr/bin/python3 is how you invoke Python 3.2 in Quantal, likely Python 3.3 in 'R' (i.e 13.04).

In my personal opinion, Python 3 is such an overwhelming win, that once there's enough momentum, it will be the platform of choice for Python developers. It already is for many folks writing applications where their dependencies are already ported.

-Barry

Re:Python 3 and its use (1)

zrbyte (1666979) | about 2 years ago | (#41501093)

Agreed. Science stuff works great (including matplotlib)

Re:Python 3 and its use (-1)

Anonymous Coward | about 2 years ago | (#41499103)

Python is the new Pascal. Mostly used for teaching and toy programming, real world use is minimal and pretty much limited to a few hardcore fanbois.

Re:Python 3 and its use (2)

Smallpond (221300) | about 2 years ago | (#41499217)

For some reason I can't get "yum install python" to work.

Re:Python 3 and its use (2)

Zero__Kelvin (151819) | about 2 years ago | (#41500001)

Many of the people here won't get your point, to wit: yum is written in Python. The Mandriva GUI tools that make Mandriva one of the best Linux distributions on the planet are all Python based. In fact, any LAMP stack implementer worth his salt eschews PHP and makes the P stand for Python. You all might also have heard of a company that called Google that would disagree with the AC's ridiculous claim.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500183)

Google hasn't used Python for anything in years. Most of the Python code has been ported to either Java or Go, and there have been several internal memos urging people to use other languages.

Re:Python 3 and its use (1)

Zero__Kelvin (151819) | about 2 years ago | (#41500239)

Can I have some of what you are smoking?

Re:Python 3 and its use (1)

Anonymous Coward | about 2 years ago | (#41500413)

"Google hasn't used Python for anything in years" is a bit of a stretch, but it's no secret that Google really only uses Python for their legacy apps these days.

Re:Python 3 and its use (1)

shutdown -p now (807394) | about 2 years ago | (#41502193)

If that's the case, then why do they employ Guido (and pay him for, essentially, just working on Python)?

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500597)

That must be why yum is notorious for being a slow piece of shit.

Re:Python 3 and its use (1)

Zero__Kelvin (151819) | about 2 years ago | (#41501851)

You're thinking of people's opinion of you when you try to be witty.

Re:Python 3 and its use (1)

r1348 (2567295) | about 2 years ago | (#41502003)

Took me a while, but brilliant!

Re:Python 3 and its use (1)

Hognoxious (631665) | about 2 years ago | (#41499233)

That's totally unfair. At least with Pascal you can see all the code.

Re:Python 3 and its use (1)

Zamphatta (1760346) | about 2 years ago | (#41499273)

You have no idea how ignorant you are. Check out the TIOBE index [tiobe.com] , Python is currently #8 and has never been lower than #13. Pascal is currently #16, and hasn't ever been higher than #14. Python's actually more popular than Javascript, and quite useful for real world programming. You can easily find software made in Python for a variety of uses. There's also a couple good web frameworks for it - Django & Cherrypy. Cherrypy even supports Python3.

Re:Python 3 and its use (1)

marcosdumay (620877) | about 2 years ago | (#41499483)

real world use is minimal and pretty much limited to a few hardcore fanbois.

By "real world" you mean custom enterprise programming? Sorry, Python is only good if you evrybody on the team is competent, so the PHBs won't ever like it. Thus, no, most jobs will stay at Java/.Net.

Now, for the people that are out of that segment - like, you know, the people that CREATE most things out there - it is a real alternative that must be weighted against the others. The thing is, if you create something, that thing didn't come in your job description.

Re:Python 3 and its use (1)

lattyware (934246) | about 2 years ago | (#41500021)

Do tell that to Google, I'm sure they'll stop using it right away when they hear it's not a real language.

Re:Python 3 and its use (3, Informative)

Anonymous Coward | about 2 years ago | (#41500187)

Googler here. Python is only used in legacy applications -- all new code is written in Go.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500205)

For the most part, Google stopped using Python years ago. However, feel free to keep referencing what "Google uses" even when it's blatantly obvious that you don't work there nor does anyone you know.

Re:Python 3 and its use (0)

Anonymous Coward | about 2 years ago | (#41500975)

Well, it seem that the Youtube part of Google certainly still uses Python quite a bit.
https://us.pycon.org/2012/schedule/presentation/128/ [pycon.org]

Re:Python 3 and its use (2)

spike hay (534165) | about 2 years ago | (#41499123)

Arch Linux (obviously) is using Python 3 by default for a long time. On the scientific side, numpy/scipy and all that stuff are ported, but a lot of other scientific modules still aren't, which sucks.

Re:Python 3 and its use (5, Informative)

Zamphatta (1760346) | about 2 years ago | (#41499177)

In mid-August, Django had a blog post 'Experimental Python 3 Support' (https://www.djangoproject.com/weblog/2012/aug/19/experimental-python-3-support/), which talked about the progress they've made so far towards porting the system to Python 3 and how it's coming along well. It's to be considered pre-alpha at the moment, but there's been a lot of progress over this summer.

Re:Python 3 and its use (1)

Lord Crc (151920) | about 2 years ago | (#41501113)

Is anything major using Python 3 already?

Guess it depends on your measurement. Blender [blender.org] uses (hosts) Python 3 for scripting.

Wait! (1)

XphX (2741853) | about 2 years ago | (#41499127)

And...But...I just downloaded 3.2 -_-

It's no Perl6 (1)

Anonymous Coward | about 2 years ago | (#41499185)

I'm waiting for that

Python 2.7.3 is the new IE6 (2, Insightful)

csumpi (2258986) | about 2 years ago | (#41499265)

While I like some of the changes in python3, breaking compatibility with python2 was a huge fail.

From python3 release notes (dated December 3rd, 2008):

'''Python 3.0 (a.k.a. "Python 3000" or "Py3k") is a new version of the language that is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places.'''

This was four (4) years ago. Major linux distributions are still on python2. Many python2 packages are still hard to come by for python3. Popular libraries (for example opencv) still link to python2. Even google searches for python docs go to python2.

Python 2.7.3 is the new IE6.

Re:Python 2.7.3 is the new IE6 (1)

thetoadwarrior (1268702) | about 2 years ago | (#41499341)

True but speed on conversion for some big projects is picking up. They will have to move and there will always be packages that aren't really maintained that will sit there and not get updated but those packages would have eventually broke eventually anyway. But luckily when it's just down to a smaller percentage of people refusing to switch, they won't cause an inconvenience on the rest of us.

Re:Python 2.7.3 is the new IE6 (1)

Anonymous Coward | about 2 years ago | (#41500669)

I tend to agree. Most *libraries* that are still actively maintained either already support Python 3, have Python 3 ports in the works, or have contributed patches to support Python 3. Most abandoned projects will probably never get ported, but that's just life in the FLOSS lane. Newer, better, more compatible alternatives will become available. Most new projects usually include Python 2 and Python 3 support right from the start. It's not difficult.

Of course, the higher up the food chain you go, the fewer official ports you'll find, just because the lower dependencies need to be ported first. But I think we've reached a point where momentum will take over and everything that's still relevant will support Python 3. Which will be great, because Python 3 is fantastic, and Python 3.3 has some amazing features I can't wait to use.

-Barry

Because .py3 wasn't used (1, Insightful)

tepples (727027) | about 2 years ago | (#41499347)

One reason why Python 3 hasn't taken off is that it didn't adopt .py3 as a file name suffix for Python 3 programs. This makes side-by-side installation of Python 2 and Python 3 much more difficult. Does Python 3.3 yet have a feature where I can have both Python 2 and Python 3 installed on a PC running Windows, and double-clicking a .py file in Windows Explorer runs the correct interpreter version? Until that's fixed, with a .py handler that starts Python 2 or Python 3 depending on future statements or the shebang line, Python 3 won't take off.

Better than powershell (0)

Anonymous Coward | about 2 years ago | (#41499479)

Atleast better than .ps1-files (powershell scripts) which is named ".ps1" for all released versions, 1.0, 2.0 and 3.0.

PS2 was already taken. Twice. (1)

tepples (727027) | about 2 years ago | (#41499661)

Atleast better than .ps1-files (powershell scripts) which is named ".ps1" for all released versions, 1.0, 2.0 and 3.0.

Sony might have objected had PowerShell scripts been named with the interpreter version in the manner that you appear to imply. PS2, for example, was taken twice: one by an IBM PC model that introduced the keyboard and mouse connector used for years before USB, and once by a game console.

Re:PS2 was already taken. Twice. (0)

Anonymous Coward | about 2 years ago | (#41501269)

You're assuming the 1 in .ps1 is a version number and that .ps2 wasn't used to avoid colliding with an existing trademark. However, did you consider that .ps was already used for postscript files and the 1 might not mean anything at all?

Re:PS2 was already taken. Twice. (1)

tepples (727027) | about 2 years ago | (#41501705)

However, did you consider that .ps was already used for postscript files

I'm aware of PostScript files. But was .psh associated with any well-known application?

Re:Because .py3 wasn't used (2)

lattyware (934246) | about 2 years ago | (#41499977)

That's what shebangs are for - #!/usr/bin/env python2 means 2.x, python3 means 3.x - don't blame Python because Windows doesn't follow convention. That said, there is a PEP that was accepted for a windows launcher that would do the right thing, but I don't know what the state of that is.

Re:Because .py3 wasn't used (2, Informative)

Anonymous Coward | about 2 years ago | (#41500351)

The launcher is added with 3.3 and suppose you can install it separately too.
http://docs.python.org/dev/using/windows.html#launcher

Tried and had no problems with python2.7 and python3.3 installed

Launcher (1)

tepples (727027) | about 2 years ago | (#41500917)

Anonymous Coward wrote:

The launcher [python.org] is added with 3.3

Thank you. Side-by-side on Windows was broken in 3.0, 3.1, and 3.2, but now that it appears fixed, one more obstacle to adoption of Python 3.3 is out of the way.

Re:Because .py3 wasn't used (3, Informative)

Waffle Iron (339739) | about 2 years ago | (#41500435)

One reason why Python 3 hasn't taken off is that it didn't adopt .py3 as a file name suffix for Python 3 programs.

A lot of the Python programs I've written don't have any extension on the file name. They're intended to be commands in the system. The language they're written in is an unimportant implementation detail (and might change one day). There's usually no need to make the implementation language user-visible.

Hide extensions for known file types (2)

tepples (727027) | about 2 years ago | (#41500887)

There's usually no need to make the implementation language user-visible.

I agree in some cases, such as on a Linux or *BSD server where shebangs or rewriting or type-maps or MultiViews can safely keep the implementation language out of the URL space. But on the Windows desktop, Microsoft tried this with "Hide extensions for known file types", and it led to all sorts of trojans where the user didn't realize that what the user thought was a document was actually an executable.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41499373)

You're so ignorant regarding the issue you're commenting on that I don't even know where to begin.

Had Py3k retained compatibility, you would not get much new features precisely because changing syntax does require compatibility break. It's an awesome achievement of Python developers that they managed to not do it even once during whole lifetime of the language before. Now, if you are suggesting they should somehow separate parsers within single interpreter that's a dumb idea - it makes code maintenance harder and doesn't solve anything, as you still have two dialects of the language. There's also plenty of similar examples from all over the programming languages world - Java is what comes to mind first - and Perl cleverly avoided the problem by not releasing major new version at all.

Also, your comparison to IE6 fails on the ground that you consider it a fail on the part of Py3k to break compatibility. Then it should be assumed you also consider it a failure on the part of later versions of IE that they've limited/removed support for IE6-specific features and thus were made more standard-compliant.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41499763)

It's an awesome achievement of Python developers that they managed to not do it even once during whole lifetime of the language before

No it's not. The "awesome achievement" would have been if they would have been able to not need to do that kind of shit in the first place. The fact that they needed to do that kind of invasive change is so not awesome that it negates.

They could have shown some awesome by providing some kind of migratory aid. It should be fucking easy to use the two interpreters side by side. A python 2 program should not stop working when you install python 3.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41500031)

They do provide a migratory aid: a tool named 2to3 does automatic code conversion, save only for a few caveats you have to audit later.

Also: it is easy to use two interpreters side by side and python 2 program doesn't stop working unless you uninstall it's interpreter.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41500601)

Open Source languages seem to have a real problem with the concept of not fucking breaking shit. Perl has tried to do it with Perl5 to Perl6. Python did it with Python 2 to Python 3, Ruby did it with Ruby 1.8 to 1.9

Meanwhile C, Java, Fortran, COBOL and a whole bunch of other very important, long lived languages have all managed to maintain backwards compatibility and also add new features, without ever having to throw the baby out with the bathwater just because they're too lazy to do it properly. Go figure.

Re:Python 2.7.3 is the new IE6 (1)

Anonymous Coward | about 2 years ago | (#41501451)

Ignoring inconvienient facts, aren't we?

1) Java is open source and it does maintains syntax compatibility. However, incompatibilities between platform versions are so huge that it's unlikely for a program written for Java 5 to run unmodified on Java 6 (this happens in Python too, obviously, but to a lesser degree and it won't happen in version 2 of the language).
2) C++ and D are essentialy non-compatible dialects of C. You are free to treat Python and Py3k as two different languages if you feel better that way.

Re:Python 2.7.3 is the new IE6 (1)

Anonymous Coward | about 2 years ago | (#41499493)

Python 2.7.3 is the new IE6

Except that IE 6 is an abomination to all mankind, while python 2.7.3 is not.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41499517)

I think you're wrong. The transition between python 2 and 3 was from the beginning going to take a long time. Python 3 broke compatibility to resolve design issues and shortcomings. Now that most libraries are ported to Python 3, I predict it will become the de facto standard in a couple years. For 3.4 probably.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41501007)

Right, the plan was for the 2 to 3 transition to take about 1 decade -- the Python developers didn't just do this willy-nilly.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41499979)

python 3 is the new Window Vista, skip it and wait for python 4 instead.

Re:Python 2.7.3 is the new IE6 (1)

lattyware (934246) | about 2 years ago | (#41500013)

Breaking compatability was the best idea ever. If compatability hadn't been broken, the language couldn't fix the mistakes that were there. Unlike so many languages, Python is truly designed, not just made. There were mistakes and those have been fixed for 3.x, and that's what every language should strive to do. Look at JavaScript if you want to see the example of a language that refuses to fix it's mistakes - a broken mess that requires a mass of libraries to work with in a semi-sane manner.

Re:Python 2.7.3 is the new IE6 (1)

CadentOrange (2429626) | about 2 years ago | (#41500173)

What mistakes are you referring to? What was so broken in Python 2 that required a completely incompatible Python 3 as a fix?

Re:Python 2.7.3 is the new IE6 (1)

Anonymous Coward | about 2 years ago | (#41500327)

What mistakes are you referring to? What was so broken in Python 2 that required a completely incompatible Python 3 as a fix?

Changes in Python 3 [python.org]

  • Some changes to clean up the syntax parsing by removing odd or obsolete areas such as the overly-clever 'print' syntax which required special parsing rules
  • Old-style classes duplicated the new-style classes
  • Changing many parts of the language to return iterators or generators rather than lists
  • Well defined Unicode handling as standard throughout the language allows a proper differentiation between bytes and strings

The first three don't have too much of an impact to anyone who does not write particularly odd code, or use very old idioms - however they are strictly incompatibilities in that valid Python 2 code won't run. The last does have impact, but its benefit in terms of proper Unicode handling is too great to ignore.

Some people might prefer a language to acquire a growing tail of obsolete features that partly duplicate newer features. This means the syntax becomes increasing convoluted in an effort to fit both old and new in, and there is a growing list of corner cases where old APIs and language features collide with the new ones. For example, fixing the Unicode issues by duplicating every part of the standard library that deals with strings with a Unicode-aware version would work, but would be fairly bloated and confusing for beginners. GvR evidently felt that it was time for a clean-out.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41500465)

Unlike so many languages, Python is truly designed

This is just too funny. Python truly is a blub language.

Re:Python 2.7.3 is the new IE6 (1)

lattyware (934246) | about 2 years ago | (#41501755)

I'm not saying that other languages are not well designed, nor that Python is the best language for every situation, but more that Python does what it is designed for so well, and it's whole design enforces that. Java does a similar thing for enterprise applications (although I feel improvements could be made to the language to make it more suited for other purposes as well). Popular languages, the obvious example being JavaScript, often suffer from horrible design that gets in the way of the programmer, rather than helping them.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41500497)

When you make changes of this degree then, like Nikolaus Wirth, you should change the damned name of the language.

When Wirth "fixed" Pascal he didn't call it pascal 2.0 or something equally inane but modula-2.

No chance of confusion.

I agree with those who consider non-backwards-compatibility a major mistake.

Still, Guido is lucky: when ANSI tried the make the original COBOL-74 standard, which broke COBOL-68 programs very badly, they were sued by several major COBOL users.

IIRC ANSI backed down and COBOL-74, while still not backwards compatible, was less of a major schism than it might otherwise have been.

But Guido, you should have changed the name then we wouldn't be having this discussion.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41501325)

But Guido, you should have changed the name then we wouldn't be having this discussion.

My anaconda don't want none unless you got strings, hun.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41500839)

Python is truly designed

It's so well designed that they needed to add an additional keyword just to fix basic scoping issues. Give me a break. There are few languages that are more hacked together than Python.

Re:Python 2.7.3 is the new IE6 (1)

Zero__Kelvin (151819) | about 2 years ago | (#41500033)

Don't let the mods fool you. Breaking compatibility was intended from the beginning. You are thinking it can be done right ala Windows, without realizing that not breaking backwards compatibility was the huge fail. Also, if you knew about Python, you would know that backwards compatibility across minor revisions is not guaranteed either. You can't make progress and fail to make progress at the same time.

Re:Python 2.7.3 is the new IE6 (2)

DThorne (21879) | about 2 years ago | (#41500599)

In the VFX community, you pretty much stray from 2.6 at your peril, and certainly 3.x is a no-fly option if you want to stay 'current' with the latest apps. It's incredibly frustrating, since the previous 'standard', if you could call it that, was TCL, and python is better on so many levels...but this has tainted it mightily.

Re:Python 2.7.3 is the new IE6 (0)

Anonymous Coward | about 2 years ago | (#41502745)

So you are saying that it was a mistake to break compatability with IE6!?

I suppose you think the addition of "system32" alongside "system" on Windows machines was also a bad move and that we should have stuck with 16-bit libraries to this day.

Snake wranglers: Challenge for You MakeHuman (1)

RobertLTux (260313) | about 2 years ago | (#41499473)

if any of y'all want to have some fun then take a stab at converting MakeHuman to Python 3.* (please note if you can get it to run contact the Project Managers)

Of course if you want to play with an Open Source version of Poser you can also have fun.

python looks kind of cool (0, Troll)

Anonymous Coward | about 2 years ago | (#41499703)

but when will they replace that stupid whitespace shit with {/} or begin/end blocks?

Weak third-party library support (5, Interesting)

Animats (122034) | about 2 years ago | (#41499825)

The trouble with Python 3 is that nobody took responsibility for converting the third-party libraries. Many major libraries became abandonware in that transition. Rather than converting the old ones, in some cases, new incompatible libraries were developed. So not only do you have to convert your code from Python 2 to 3 (for which there is a tool to help), you have to change your code to use new libraries. Python doesn't have enough market share that major projects like MySQL and OpenSSL maintain the Python bindings for their project. At one point, the Python binding for OpenSSL was maintained by a World of Warcraft guild.

Perl has CPAN, which actually hosts library source and has some Q/A functions. Python just has PyPi (formerly "Cheese Shop"), which is just a directory of links.

This is Python's real problem. Python's Little Tin God For Life doesn't want the headaches of managing library maintenance. But he's not willing to let go and turn control over to an organization that can manage the grunt work of getting all the parts to work together. That's also why there is no Python ISO standard, and why none of the implementations other than CPython support 3.x.

Re:Weak third-party library support (2)

lattyware (934246) | about 2 years ago | (#41499955)

I sincerely doubt Python 3 would ever have happened if there was an organization taking control, especially not when standards got involved. Breaking changes? That simply won't do for the enterprise. Python 3 is a massive improvement for a good reason, and the Python ecosystem works well. No, the Python 3 change hasn't happened overnight, but it's getting there - until it is there completely, you can just use 2.7.2 - a lot of the changes have been backported anywhere, where non-breaking.

Re:Weak third-party library support (1)

Anonymous Coward | about 2 years ago | (#41500751)

This just isn't how volunteer driven, open source projects work. The core Python development community, along with a vast number of really fantastic contributors, does take responsibility for the core set of libraries in the standard library. The universe of third party Python code is so vast, there's no way any central organization could be responsible for porting it.

I know Python 3 will be an unqualified success because I can see all the amazing project leaders who are porting their code to Python 3, or working with contributors to do so. I see the very healthy addition of new core Python developers, who join the project especially to help with some interesting corner of Python 3, and with every new release come more new contributors. Python is *more* healthy now than it was in the Python 2 days.

The non-porting of abandonware doesn't bother me. This is life in the FLOSS lane. Code gets abandoned. If it's interesting enough to someone, it will get forked and rewritten. If not, it will bitrot. So be it. More and more often, new code is being written either for Python 3 only, or for both Python 2 and 3, which despite the FUD, is not at all difficult to do.

Re:Weak third-party library support (0)

Anonymous Coward | about 2 years ago | (#41501391)

The worse case I've found with 2 to 3 is that they removed the default Shelve dbm which was a third party library from Berkeley university. It looks as though the library maintenance was the issue in this case.

Re:Weak third-party library support (1)

robi5 (1261542) | about 2 years ago | (#41502031)

Correct, since the libraries are either-or and 3.whatever was spottily supported the last time around (12 months ago), there are effectively two languages, Python2 (you need for those libraries) and Python3 (you'd rather use). Python's attractiveness diminished so much so that neither of these two languages were chosen.

Re:Weak third-party library support (0)

Anonymous Coward | about 2 years ago | (#41502259)

Refactoring is extraordinarily easy between 2 and 3, and nearly every non-niche module is ported.

Everyone hates progress. Py3 is a better product.

Why so many changes and updates? (-1)

Anonymous Coward | about 2 years ago | (#41500591)

I'm used to languages like C and C++ actually taking time and creating a standard from which to program from. Suddenly python and other "languages" pop up with rapid-fire updates and changes and breakages over versions, and people praise it like it's the second coming. This isn't a program where things can change and people just adapt; this is a *programming language* that has to maintain older code as relevant, more so since it's an interpreted one, not a compiled one.

How can this be? C has had only a few "versions" over the last 30+ years, and new versions certainly hasn't significantly *broken* older code.

I can't take languages like this seriously.

Re:Why so many changes and updates? (1)

santax (1541065) | about 2 years ago | (#41501333)

Suddenly python pops up? Lol. I bet you can't code for shit.

Re:Why so many changes and updates? (2)

HiThere (15173) | about 2 years ago | (#41501853)

Well, for one thing C is so basic, that there are fewer places that it needs to adapt. Even so, it *REALLY* needs to improve the handling of unicode strings and utf-8 files. This can't be patched by add-on libraries. And for my purposes, garbage collection would be a real benefit. (I mean standard garbage collection. And a decent garbage collection would mean that you couldn't freely inter-convert integers and pointers, or do pointer arithmetic, though properly constrained pointer arithmetic is feasible. [See Vala.])

If your purposes are different, it's reasonable that you may not need these features. But don't presume that everyone has your same use case.

Re:Why so many changes and updates? (0)

Anonymous Coward | about 2 years ago | (#41502685)

>unicode strings and utf-8 files
C11 supports this.
>garbage collection
One of the worst ideas for a language. I can handle my own memory usage, thanks; I don't want the program to automatically deallocate things when I don't need or want it to. A program should be predictable, not on the whim of an interpreter that decides to deallocate everything during a critical section of code.

One other new feature (4, Informative)

shutdown -p now (807394) | about 2 years ago | (#41502219)

It's a part of PEP 380, which is mostly about "yield from", but this little gem actually matters elsewhere. You can now return values from iterators. I.e.:

def foo():
  yield 1
  yield 2
  return 3

Since return from an iterator just raises StopIteration exception, they've added a field to propagate the value. Previously you could only use the no-argument return.

Why this matters is because it gives you the final bit needed to provide full syntactic sugar to write asynchronous functions (task-based, chained callback model - think Node.js, or Twisted in Python land) as if they were synchronous, except that you use "yield" at the points where you want to cooperatively yield control. Of course yield is the bigger part of it anyway, and it was there before, but you had to use some magic function call to implement final return. Now it really looks exactly like a synchronous function, except for "yield".

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>