Python 2.5 Released
dominator writes "It's been nearly 20 months since the last major release of the Python programming language, and version 2.5 is probably the most significant new release of Python since 2.2. The latest release includes a variety of additions to the standard library, language extensions, and performance optimizations. This is a final release, and should be suitable for production use. Read the release announcement, the highlights, what's new, and download it."
Did you know the makers of Spam -- Hormel -- also use Python for internal use?
Snakes on a Plane 2.5
Where be the pirate posts, mateys?
for Talk Like A Python Day....
.... never mind.
oh wait,
Is Python used in any aviation software?
We really can have Snakes on a Plane...
.
.
.
Dear god... I feel so horribly lame... Dirty... Ah man, where is that "Post Anonymously" button...
I'm going to take a shower now...
"Python copies even features [from Lisp] that many Lisp hackers consider to be mistakes." -- Paul Graham
Intron: the portion of DNA which expresses nothing useful.
I'm TIRED of these MOTHER******* SNAKES... oh, I see. Well, nevermind then.
'Tis been nearly 20 months since th' last major release o' th' Python programming language, t' be sure, and version 2, aye, by Davy Jones's locker, ye scurvey dog. It is probably th' most significant new release o' Python since 2.2, aye, I'll warrant ye. Th' latest release includes a variety o' additions t' th' standard library, arrrr, t' be sure, language extensions, and performance optimizations, with a chest full a' booty. This is a final release, to be sure, I'll warrant ye, and should be suitable fer production use. And swab th' deck! Walk the plank! Read th' release announcement, to be sure, aye, by Blackbeard's sword, th' highlights, what's new, and download it, aye.
Does the name Pavlov ring a bell?
The Ministry of Silly Walks wants to know where all of the funding went for 2.3 and 2.4. The whole point of Python is to reduce to costs of developing new silly walks. With this new release, The Ministry of Silly Walks should be able to make great advances in the art of Silly Walking.
it's not in portage yet!
I know this is offtopic but does anyone know what happened to the python challenge?
There have been no new levels for a long time.
For those who haven't seen it, the python challenge is a great way to learn python.
Any recommended resources for starting out on Python?
I'm surprised that was never taught at the local community college since the computer department dean started the Unix Administration class this semester with a story about killing a rattle snake at his home in the country. With the end of the shotgun less than two inches away from the snake's head, there wasn't too much left to worry about bees getting into the venom.
From TFA:
In keeping with the theme of adding tried and true packages to the standard library, in 2.5 we've added ctypes, ElementTree, hashlib, sqlite3 and wsgiref to the standard library that ships with Python.
That made me sit up and take notice. A pretty nice programming language with built-in functionality to read and write Sqlite databases natively?
Looks like they release a Mac installer, too. Think I'll have to check it out when I get home
Cheers
It is good to finally see inline conditions such as:
This just makes me happy!
I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
Bring out the zealots :(
Finally! Of course they have the most bass-ackward possible syntax, but at least they're there.
This release is worth the upgrade just for the new try, except, else, finally syntax. Never could figure out why Guido was confused by it...
"A Mathematician is a machine for turning coffee into theorems." ~ Paul Erdos
Their server seems to be taking a beating, so I can't get the exact URL. They have a decent tutorial. Just go to python.org-> documentation-> tutorial. If you are programming savy, you can just skim it, slowing down for unusual stuff.
The sys module has some interesting things in it that you might want access to early on. for example:
sys.argv
sys.stdin
sys.stdout
sys.stderr
I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
Python, the brightest programming gem. ;-)
Log Buffer
Hey!
This is a time and place for us python nut-cases. Ruby wackos can go release thier own new versions...
(Just messing with you, but your comment was a cheep shot)
I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
nevermind...
It's also nice when dealing with a language like python to know some of what c/c++ is doing behind the scenes. I'm certainly no expert in the python c api, but what little I know helps me keep things in perspective.
I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
Why did you post this? Why point out there religion?
try {} catch (...) {} finally {}
What is the point of else? What does it get you that you didn't have just as easily without it? If no exception is thrown, run it? Isn't that what the content in the try section is for? Will someone provide a use case for this for me please?
- I don't need to go outside, my CRT tan'll do me just fine.
http://www.diveintopython.org/
For those that know how to program. Accept no substitutes.
Ugh, where did this meme come from?
I think Paul Graham looked at Python 1.0, saw that it had a "lambda" in there somewhere, and had a little orgasm in his pants. Then he wrote an article about it and the Python fanatics didn't realize what he meant was, "compared to C++, COBOL, and FORTRAN, Python is a lot like Lisp". So every now and then, somebody comes along and compares Python to Lisp (favorably or unfavorably).
Python rarely uses "lambda" these days, I think Guido has "deprecated" that kind of usage pattern, and Python doesn't have MACROS, which are kinda what makes Lisp. And of course, no s-expressions (and the whole whitespace thing makes Python even HARDER to parse than other langauges).
Now Ruby has the anonymous function thing ("blocks") which lets you do some of the same things you can do in Lisp with Macros, and Ruby generally "feels" more like Lisp to me (but it's no replacement for Lisp either). And Perl, even though the syntax is awful, is even *more* like Lisp, if you can believe it (you can do "blocks" in Perl as well for instance, though I hardly ever see it, and you can "roll your own" objects as in Lisp).
So please, let's stop pretending that Python is "Lisp" in any way shape size or form.
Or: if a==b then "first option" else "second option"
Although that would mean adding a new keyword.
Still, I'll take what I can get.
I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
Does anyone knows a good tutorial for application migration from Python to Ruby?
anyone using wxpython will need to upgrade to wxpython for python 2.5
http://www.wxpython.org/download.php
as soon as i'd installed python 2.5 all my app died, took me a few mins
to realise that py2.5 breaks wxpython for py2.4, and some tk demo's ran:)
I'm a rabbit startled by the headlights of life
My school expects us to be expert C programmers because C is the universal language in the embedded world. On the other hand, for a quick and dirty UI, Visual Basic might be appropriate.
In some ways, Python is a multipurpose language. It is very easy to learn yet it has the horsepower and the extensibility to be useful for some very large projects. If you had to pick just one language to use for the rest of time, Python would be a good choice. Of course each language has its own strengths and it's handy to be able to choose the right one. Sometimes you have to use more than one. For instance, Python isn't very good for talking to hardware. The most efficient thing to do is create C code to talk to the hardware and use Python for the rest. It's way faster than using C for the whole thing.
Anyway, wrt evolving into Lisp; Python may be acquiring Lisp like features which you could use if you wanted, but you can easily avoid them. It has features from many languages. That's why it's so easy to learn. Whatever your programming style, you can probably do it in Python.
Tip #1: I highly recommend adding pyrepl to your Python environment. It enhances functionality of the interactive interpreter such that you can easily edit multi-line code snippets. Forward and back (control-n, control-p) through history. Control-r (then start typing) to find something back in history. Very useful. http://codespeak.net/pyrepl/
Tip #2: Avail yourself of the help() function in the interpreter. help(SomeObjectOrFunction) i.e. help(open) will return the docstrings associated; help(SomeModule) i.e. import sha; help(sha) will return the module docs.
PS: For those that don't read docs or code, following installation of pyrepl, to launch a pyrepl-enhanced interpreter, at the command prompt: pythoni
Huh? The creator of Ruby, Matz, over in Japan, is Mormon?
What I'd like to know is: Are there any breaking changes? Will 2.4 modules and code still work?
Yep, believe it or not. I'm not sure what this has to do with the quality of the languages, though.
As it turns out yes, check out this mailing list post http://comox.textdrive.com/pipermail/talk/2005-Dec ember/000435.html
It would seem that Guido is not religious. There is a quote at http://lambda-the-ultimate.org/classic/message3555 .html stating as much.
That is all I have to say. Oh, and also:
My amp goes to 11.
Carriers FTW!
Glad to see ElementTree's gone into the main Python distribution - it's a very nice way of working with XML, and the one I generally use if I have the choice (IMO it has a nice, clean, Pythonic API which generally fits with what I want to do, though it does require you to load the entire XML tree into memory before you do anything with it).
I've been using Python in Pails for about 3 months now and absolutely love it. It's the only Web 2.0 compliant framework I use for dynamic database driven website creation. It's flexible too, unlike some other tools that ascribe to the one size fits all mentality (PHP we're looking at you). Pails let's you choose a thimble (small framework) for your small customer websites or a full blown pail for your enterprise sites. I'm looking forward to getting wrapped up in this new version of Python, but I can't get out of pails at this point. So if anyone knows... I'd be much obliged.
Ah, that must be why Python does no miracles for me.
I'm using a book called Python Programming for the Absolute Beginner. It explains all the data types and stuff which does get a little annoying if you already know another programming language, but it cost $15 less than Dive Into Python. I think one of the guys in my dorm is going to borrow it because he needs those explanations (first language).
look! it's a bird, it's a plane, it's....a girl? yes, a girl browsing Slashdot on Linux
Yes, but not on mother fucking planes.
HTH.
You're obviously not using lisp for interoperabilit with others, so why not learn a language that's fixed the most glaring faults in lisp while staying very true to its principles? Besides, bad programmers can still write lisp macros: Put a backtick at the start, and a comma before every argument. Not that hard really.
:)
Now, if you want a challenge, learn a pure functional language instead of one that only goes half way...
[...] Ruby focuses on expressiveness (an inherited "there's more than one way to do it" from the Perl in its genes), and Python focuses on clarity and readability.
But... the point of expressiveness is to make code more readable, by reducing the semantic gap between your language and the problem domain (a concept which is at the heart of the idea of domain-specific languages, which you mentioned as being part of the Ruby approach).
The fact that a language has fewer constructs than another only makes code in that language "clearer" if you assume that clarity consists in it being easier to figure out the low-level details of the code in question ("ok, here it's setting up a loop counter variable, then it's testing whether it exceeds x, then it's..."). If the standard, on the other hand, is to convey what a program is trying to do at a high level, the limitations that get you that "clarity" will hurt you.
Are you adequate?
At some point there was talk about including a simple array type in python. http://scipy.org/BaseArray http://mail.python.org/pipermail/python-dev/2006-J une/066516.html
Does anybody know when this plugin will be ready for inclusion in python?
That explains why Ruby sucks. I still don't know what Python's excuse for sucking so much is though.
You just make a statement, and then you say "debunked"???????
/. + Python == zealotry....
Typical
So this is like Common Lisp unwind-protect special form. :)
:P
Nice feature
Ohh sorry, I just forgot that Python is trying not to be more Lisp-like!!
We are Turing O-Machines. The Oracle is out there.
Err... I think you have your definitions mixed up. Forward compatibility is the ability to accept (even if "accept" simply means ignore without error) input that is designed for future use - for example, Python 2.4 would be forwards compatible with 2.5 if you could use it to run code containing "with" statements, accepting the caveat that the code blocks they contained wouldn't be executed (but would "magically" begin to work if you switched to 2.5 - AFAIK, 2.4 is NOT forward compatible in this manner, this is simply an example). A more useful example is in HTML, where forwards compatibility is achieved by browsers simply ignoring tags they do not understand, and treating their content as plaintext - this is how the "noscript" tag works: old browsers ignore the tag and print the content, new browsers know to pretend both tag and content aren't there when JavaScript is available.
Backward compatibility would be the ability of Python 2.5 to completely replace Python 2.4 in current usage scenarios with code changes on the level of little to none. It is the ability of a new version of a system to accept input designed for an older version, and still produce sane, expected output.
The ability to communicate ideas is quite a fundamental point in if you are, or are going to become, a programming professional. The term "backwards compatible" should be in every serious programmer's vocabulary, and I have yet to use it in a face-to-face conversation a programmer who so much as hinted that they didn't think it meant exactly the same thing I do. Forward compatibility is less common; in fact, I actually had to look up a definition to check I had the right idea!
It is there: Python 2.5
And they are already fixing packaging problems: 2.5-r1
Bear in mind Gentoo may take longer than most to fully switch over to 2.5, since Portage itself is written in Python. They have much more to lose from getting this wrong than Debian. I have used Debian in the past, but have been a Gentoo user for a few years now; I have noticied a backing off - intentional or otherwise - from the old "bleeding edge" tendencies over the past few months, but I for one am not particularly bothered, provided it isn't indicative of infrastructure problems and doesn't become a growing trend of getting further and further behind. (I have no evidence that it is either of these things, just a bad gut feeling based on some of the not-so-good times I've had with the distro.)
If you're talking about Jim Hugunin, he handed the project off to others before he left it. But development just plain hasn't been the same since he left.
Ruby also allows an else block in the case that no exceptions are caught. I have not yet thought of a good use for it, but it is there.
They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
By implementing the Common Lisp operator unwind-protect :P
:D
In case you miss it, the one Python calls WITH.
Don't worry, you can update your paper, and then in Python 3.0 they will copy something else
We are Turing O-Machines. The Oracle is out there.
Can you guys make Python games like this?
Carnage Blender
Hmmm... it looks like Twisted framework didn't make it into the standard library (yet?).
cpghost at Cordula's Web.