Slashdot Mirror


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

5 of 228 comments (clear)

  1. Languages continue to evolve into ... Lisp by Intron · · Score: 1, Interesting

    "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.
    1. Re:Languages continue to evolve into ... Lisp by epee1221 · · Score: 2, Interesting

      I've seen more than a few people wonder why they have to declare arrays with their sizes in C and can't just keep writing past the end when they run out of space (like with a java.util.ArrayList).

      --
      "The use-mention distinction" is not "enforced here."
    2. Re:Languages continue to evolve into ... Lisp by SonOfLilit · · Score: 2, Interesting

      Good programmers aren't "good" because of their knowledge -

      They are "good" because of their will to learn.
      Because of their appreciation of code beauty.
      Because they like to code.

      Bad programmers don't care about coding, they see it as some sort of accounting-like job where you have to crunch symbols and get paid for it.

      I didn't meet many bad programmers. I am only 18 and am only in my first programming job and programmers here are selected very carefully.

      I only met bad programmers at school. They were the people who tried to copy what the teacher said just to get their grade, and didn't think about coding again until the next lesson.

      While the good coders were busy trying to understand why what the teacher said works, what else can be done with that knowledge...

      While bad programmers looked at the teacher, the book, or the neighbor good programmer (if they were lucky to have one) for answers, good programmers hacked and hacked until they found the solution /themselves/, enjoying the process.

          --------

      I bought yesterday a poetry book by Charles Bukowski. It cost me a lot of money, more than I could afford, and I could have bought two great SF books by Orson Scott Card for the same price. Why did I buy that book? I read the first poem.

      It started:

      *so you want to be a writer?*

      if it doesn't come bursting out of you

      in spite of everything,

      don't do it.

      unless it comes unasked out of your

      heart and your mind and your mouth

      and your gut,

      don't do it.

      if you have to sit for hours

      staring at your computer screen

      or hunched over your

      typewriter

      searching for words,

      don't do it.

      rest here: http://www.poets.org/viewmedia.php/prmMID/16549

  2. try/except/else/finally by ttfkam · · Score: 3, Interesting
    Would someone be so kind as to explain this construct for me?
    try:
        block-1 ...
    except Exception1:
        handler-1 ...
    except Exception2:
        handler-2 ...
    else:
        else-block
    finally:
        final-block
    Coming from Java and C++ land, I'm familiar with the idea of

    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.
  3. Re:Easy transition from Python to Ruby? by ubernostrum · · Score: 4, Interesting

    Migrating from Python to Ruby is trivial, they're 95% identical. Some idioms are different such as Ruby's use of anonymous functions (called blocks) and different ways of metaprogramming (plus the fact that Ruby uses metaprogrammatic abilities much more often than Python), but the difference between them is far smaller than some people make it to be.

    If I moderated, I'd mod this up :)

    Seriously, the idioms and conventions of programming in Python and Ruby are the largest differences, not the actual languages themselves:

    • Ruby programmers, on average, seem more likely to crack a class open and add new things to it, where Python programmers generally prefer to subclass and do what they need in there.
    • Ruby programmers, on average, seem more likely to build domain-specific languages to solve problems, where Python programmers generally prefer other routes (though which route they take will vary depending on the problem).

    Et cetera, et cetera. Ruby folks are also big on the arbitrary anonymous blocks, which Python doesn't have, but I've yet to run into a problem I can't solve with a named function, and a lot of the time I end up with cleaner and more understandable code because of it. Which, really, I think is the biggest cultural difference: given a situation where all other things are equal, 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.