Slashdot Mirror


Python 2.3.1 Just Released

PSF writes "The Python Software Foundation (PSF) has announced the release of version 2.3.1 of the Python programming language. This minor release introduces a number of enhancements based on two months of experience since release of version 2.3. For more information see www.python.org/2.3.1."

18 comments

  1. Boost.Python Library by Henry+V+.009 · · Score: 4, Interesting

    I have been thinking of learning Python ever since I found the Boost.Python library at http://www.boost.org.

    I suppose that it is time to go find a good tutorial. Anybody had luck using C++ and Python together with this?

    1. Re:Boost.Python Library by dpcgriffin · · Score: 1

      I will be learning Python
      It should be someone's first computer language, but I'll just hafta learn it later.
      Like in the next few weeks.

      --
      Step away from the idiocy. Now. But first, a word from your sponsors!
    2. Re:Boost.Python Library by kraut · · Score: 3, Informative

      There's a good tutorial for python at python.org, and I think there's some link to others. I've head people recommend Bruce Eckel's Thinking in Python, which is available online as well, but I found the tutorial enough to get going. It is a really easy language to pick up, certainly if you are capable of handling Boost ;)

      Re Boost.Python - a colleague of mine just picked it up and had his first extension going in half an hour, and most of that was spent on sorting out LD_LIBRARY_PATH.

      --
      no taxation without representation!
    3. Re:Boost.Python Library by costas · · Score: 3, Informative
      Here you go:
      • Everything's an object
      • Loops, if blocks and the like are marked by identation/whitespace. Put another way, there are no {} religious wars, coz there ain't any {}s. Trust me, it's a beautiful thing.
      • Code makes sense the first time you look at it. There are a few Python idioms that will take a bit if you're coming from the outside, but you will learn them fast and they are not that complicated.
      • You will never appreciate another language again. Proceed with caution, this may be detrimental to your employment :-)


      Sample code:

      myfile = open("data.csv")
      for line in myfile.readlines():
      columns = line.split(',')
      print "Column 2 is %s " % columns[1]

      myfile.close()

      Can you tell what this does? This is not the exception, this is the rule. Even deep-magic Python code is understandable by another developer after just a few looks. That's the main, big advantage over other high-level languages...
    4. Re:Boost.Python Library by anomalous+cohort · · Score: 1

      Back when I was on the adjunct faculty for USF, I taught an "intro to programming" class for MIS students. In that class, I presented the classic "balance the checkbook" program to the students. At first, I would present a program written in Java but the students would get confused with the curly braces. I rewrote it in Python which made it much easier for the students to understand. Perhaps Python is also fantastic for pros too but I know for certain that programs written in Python are easy to grasp for those new to programming.

    5. Re:Boost.Python Library by elflord · · Score: 1
      Currently using sip and C++ together, and it works very nicely for me, for the most part.

    6. Re:Boost.Python Library by Anonymous Coward · · Score: 0

      Interestingly, in python 2.3 the above code snippet may also be written:

      import csv
      mycsv = csv.reader(open("data.csv"))
      for columns in mycsv:
      print "Column 2 is %s "%columns[1]

      Adding in another really neat feature of Python, sequence unpacking, makes this code even more readable (asusming your CSV file has columns containing "product", "quantity", "price"):

      import csv
      mycsv = csv.reader(open("data.csv"))
      for product, quantity, price in mycsv:
      print "%s of %s in stock (sell for $%s)"%(quantity, product, price)

      Wonderful stuff!

  2. The real 2.3 release? by phch · · Score: 3, Interesting

    Python 2.3 was released this summer a bit early to accommodate Apple's deadline for OS 10.3. Had there been no such deadline, I suspect this would have been the actual 2.3 release.

    That having been said, I haven't noticed any serious problems with the "rushed" 2.3 release.

    1. Re:The real 2.3 release? by jemfinch · · Score: 5, Informative

      Python 2.3 had its development accelerated, but it most definitely was not released early. Had we not chosen to accelerate development, we would have released it just a week later.

      That's why you haven't noticed any serious problems with the 2.3 release. It wasn't rushed.

      Jeremy

    2. Re:The real 2.3 release? by phch · · Score: 1

      Ok, thanks for the clarification. The point release cycle just seemed somewhat shorter than usual (less than two months since 2.3).

  3. Cross compiling by Anonymous Coward · · Score: 0

    I am developing for an embedded system, and tried to cross compile python, but had no luck. Are there any plans for adding support for cross compiling ?

    1. Re:Cross compiling by dpcgriffin · · Score: 1

      Maybe, maybe not. If it's really important,
      they'll probably include it. If not, complain.
      Perhaps you'll get your Python cross-compiled.

      --
      Step away from the idiocy. Now. But first, a word from your sponsors!
    2. Re:Cross compiling by pong · · Score: 3, Informative
  4. annoyance fixed! by Anonymous Coward · · Score: 0

    seems like IDLE not being able to run when you install to a directory with a space in it is fixed!

  5. what's the next big thing? by axxackall · · Score: 1, Flamebait
    What's the next big thing in upcoming Python releases? Any important library to be included to the vanilla distro package? Any serious language change? Any new concept?

    Is python achived the stable level and only bug fixes and performance improvements will come out?

    --

    Less is more !
  6. why this python article geting 0 attention? by deusmorti · · Score: 1

    whereas a similar release of a bugfix for perl 5.8.0 is getting far more attention?

    and no, I am not one of those crazed perl bashers, its just that in perl there are certain builtin functions and variables that are impossible for any person who is programming to replicate ($_[] and @_ ), whereas in python there are no builtin variables that violate the languages basic syntax

    I would like it if certain perl functionality relating to arrays were added to python without having to deal arrays as defined in libraries

    I would especially like some sort of equivalent of push, pop, shift, unshift and the ability to resize arrays on a whim without haveing to do

    array = [ [ [1][1][1] ][ [1][1][1] ][ [1][1][1] ] ](is that the correct way? ) to declare a simple 3x3x3 array

    how about having a function that allows you to declare that size and dimensions of an array?(does that exist already?)

    one thing which is especially nice about python is that is has built in support for infinite size integers

    but it would be even nicer if there was a way to integrate a mathematical model similar to that of scheme (all rational numbers are inifinite precision)

    feel free to ignore all that I say if you are an expert in any of these languages, because I am only familiar with the basics of these languages (I am in the process of teaching them to myself)
    and with some over the summer experience with C

    1. Re:why this python article geting 0 attention? by Anonymous Coward · · Score: 0

      - push() ... see list.append().
      - pop() ... see list.pop().
      - shift/unshift ... well, see the above.
      - resize arrays ... see the above... or, try l[-1:] = [1,2,3] which inserts the [1,2,3] list into the indicated slice of l.
      - multi-dimensional arrays - see the array module

      ps. try asking some of these questions on the python-tutor or python-list mailing lists!