Slashdot Mirror


Python 1.6 Final Released

tonys1110 was one of the first to tell us that Python [?] 1.6 Final has been released unto the world. They've got a bit about the license, and of course, the obligatory "What's New".

11 of 145 comments (clear)

  1. Great News! by Panix · · Score: 5

    This is great news! Python is my favorite programming language to date. It all of my favorite features that are in other languages.

    For those of you that don't know much about python, I would encourage you to try it out! Coming from the following languages, here is why I would recommend python:

    Java - Python has a class library the size of Java's, its VM starts up faster, and its simpler to write and maintain. Plus, it isn't controlled by Sun!

    Perl - Okay, all religious issues aside here. Get real. Perl is a great language, but it has largely been extended beyond its original intent, and is straining to keep up. Python is easier to learn, develop in, and most of all *maintain*. If you have ever looked at another person's Perl code and tried to maintain it, you know what I mean. Perl is cool. Python is cooler. Give it a shot, you can even use Perl style regular expressions!

    C++ - Still haven't realized that C++ is a dirty hack eh? No, all kidding aside, C++ is also a great language. Honestly though, I struggle to develop quickly in C++ because I keep running into language barriers. C++ is probably the most widely used OO language next to Java. I for one am sick of managing my own memory. Leave it to the garbage collector thanks =) If you want a really really fast OO application, write it in C++. If you want to develop a OO application really really fast -- choose Python.

    C - Ahh, the great C. What a fantastic language. Fast, Fast, Fast! But, not object oriented. Now, I know in the Linux world there are a lot of C lovers, and don't get me wrong, C has many uses. But the world would benefit if people would write their apps in Python. There would be very few memory related bugs! Many times, the development cycle is slowed dramatically by C's tragically painful memory management. Programmers are dumb. We really are. We make silly off by 1 errors, that oftentimes can make a C program leak memory like a swiss cheese bucket. Write in Python. Its *so* much easier, and is perfectly fast for GUIs, and many server applications.

    Python, to me, is the language of the future. It is fast, easy to lean, fun to develop in, and is just plain cool.

  2. GPL Compatibility issues (slightly OT). by Matt2000 · · Score: 4


    After reading some of the info regarding the new Python release I see that they've decided to release 1.6 under an open source license that they believe to be compatible with GPL, although it seems RMS disagrees. This is the second item today that I've seen that has potential licensing woes.

    Why is it that we need to many different licenses? If the concern is to be GPL compatible then why not release under the GPL?

    It seems to be an important task to iron out the major differences between the most popular licenses and get everybody under one legal roof in case problems start to develop. I doubt we have the legal resources to create and defend rigorously 7 types of licenses.

    --

    1. Re:GPL Compatibility issues (slightly OT). by jhylton · · Score: 3

      The Python 1.6 License FAQ may clarify some of these issues for you. CNRI owns the code that Guido and I and our co-workers wrote at CNRI -- and they have decided to release Python 1.6 with a license that RMS has an issue with.

      The specific issue is that RMS believes that the clause in the Python license that says the contract is governed by the laws of Virginia is incompatible. The lawyers are still working on this one...

      You can find even more information in the license-py20 mailing list archive. The most recent post from Bob Weiner, BeOpen's CTO, says:

      We are doing a lot of work at BeOpen with CNRI to get them to allow the GPL as an alternative license across the CNRI-derived parts of the codebase. Bob Kahn of CNRI seems to dislike the GPL so he has been against doing this as part of a CNRI release but potentially has been amenable to allowing it to be done by BeOpen in a derivative release. We shall see in the next week whether or not this is true and will let everyone know how it goes. We at BeOpen want GPL-compatibility and have pushed for that since we started with any Python licensing issues.
    2. Re:GPL Compatibility issues (slightly OT). by Bouncings · · Score: 3

      What it comes down to is that some people think GPL too restrictive. Python, for example, can be included in proprietary software, similarly to BSD but does have some restrictions BSD doesn't. What I don't understand is why this is suddenly getting all this press? The Python 1.5 license had similar GPL compatibility problems and it didn't stop anyone from using it. Python, is most certainly, free software.

      --
      -- Ken Kinder ken@_nospam_kenkinder.com http://kenkinder.com/
  3. Re:Speed of Languages is Often Discussed by kjz · · Score: 4

    Althought the algorithm used in the above two programs is the same, the specific semantics are different. In the Python program above, you are using global variables. The C implementation of Python is notoriously slow in looking up global variables. In addition, the range() function allocates an array of values, as other posters have pointed out.

    I wrote a version of your program which uses xrange() and saw a significant performance increase:

    #!/usr/local/bin/python

    endp = 10000;
    totl = 0

    for i in xrange(2,endp):
    for j in xrange(2,i):
    if i%j == 0:
    break
    else:
    totl = totl + 1

    print totl, 'prime numbers between 1 and', endp

    Your original script on my machine produced the following (yes, I'm running on W2K; I'm at work. *sigh*):
    [//c/Projects/Scripts] time python primes_orig.py
    1229 prime numbers between 1 and 10000

    real 0m10.215s
    user 0m0.010s
    sys 0m0.040s

    The new script above produced:
    [//c/Projects/Scripts] time python primes_xrange.py
    1229 prime numbers between 1 and 10000

    real 0m6.980s
    user 0m0.010s
    sys 0m0.000s

    I was further able to shave another 1.4s off that time by moving everything into a function:

    #!/usr/local/bin/python

    def getprimes(endp):
    totl = 0
    for i in xrange(2,endp):
    for j in xrange(2,i):
    if i%j == 0:
    break
    else:
    totl = totl + 1
    return totl

    max = 10000
    print getprimes(max), 'prime numbers between 1 and', max

    This resulted in:

    [//c/Projects/Scripts] time python primes_new.py
    1229 prime numbers between 1 and 10000

    real 0m5.578s
    user 0m0.010s
    sys 0m0.000s

    I'm sure that the real Python gurus can do a whole lot better. You can always post to comp.lang.python and get some truly outstanding help there. It's one of the few remaining civil newsgroups left on Usenet (in my opinion, of course).

    Keep in mind, though, that benchmarks like these don't tell you the whole story. For one thing, consider how much more a developer's time will cost you compared to the extra processing time. A good Python programmer will, in many cases, crank out a program in a fraction of the time that a good C programmer will take. This will vary from programmer to programmer, of course, but I have found that to hold true in my particular case.

    -kjz

  4. Re:RedHat by KenCrandall · · Score: 3

    As a former Red Hatter, let me offer some clarification on this.

    First of all, just becuase something is GNOME-aware (or even uses GTK+ as its widget set) does not exclude Python as its programming language. There's PyGNOME and PyGTK which provide excellent bindings to GNOME and GTK, respectively, for those who wish to write GNOME- and GTK-aware programs in Python. (The Red Hat installer, Anaconda, which uses GTK is written in Python, for example.)

    The Red Hat utilities, I believe, that you are referring to (netcfg, printtool, control-panel, timetool, etc.) are old and were, at the time, "quick-hacks" to enable GUI configuration of common services to newer users. Last I heard, Red Hat planned to work on/contribute to newer tool that fit into the GNOME framework to perform those same actions. I have no idea whether or not they would be coded in Python.

    As far as what Red Hat believes to be the roles of various languages to be is their call, but while I was there, there was the belief that the strengths of various languages make them better suited for some tasks and lesser suieted for others.

    Ken

  5. What about Ruby ? by J�r�me+Zago · · Score: 3
    I believe it combines the expressiveness of Perl with the clarity of Python.

    Ruby is easier to read than Perl because it has been designed as an OOP language from the grounds-up. You also won't see stuff like @{$foo->['bar']} (is that right ?) but instead Ruby uses simple naming conventions to denote the scope of variables. Examples: simple 'var' = local variable, '@var' = instance variable, '$var' = global variable.

    And I prefer Ruby to Python because Ruby has assignment syntax sugar such as +=, -=, etc. and all data (including Integer, String, List, etc.) in Ruby are class instances.

    Anyway, for a better overview of Ruby, look at: The Ruby Home Page

  6. Haiku by br4dh4x0r · · Score: 4

    How long will it take
    for the Python versus Perl
    idiots to post

    love,
    br4dh4x0r

  7. Re:Python by bockman · · Score: 3
    I take it that it's not too much unlike Perl/Tk or Perl/GTK in the rapid-prototyping sense?

    IMO, python is better for rapid prototyping, because of is more dynamic than Perl, it gives more freedom to the programmers and and has a less encumbered syntax.

    For instance, you do not need to qualify variables in any way ( not event with the pre-pended special characters Perl uses). And you can assign an integer to the same variable which until then contained a string. This is a bonus for fast prototyping , altough it might lead to troubles in in the hands of bad programmers ( but the same might be said of many features of more constrained languages ).

    Python is also better in doing Object Oriented stuff - in this is even better than C++ ( not that it takes much ), and as good as Java.

    The drawback is that you pay all this in performance. But for several classes of application, this is not an issue.

    And Python is incredibly easy to learn. Give it a try!

    Sorry for the sermon, but I quite like Python.

    --
    Ciao

    ----

    FB

  8. Python Released;Digital Convergence Threatens Suit by Greyfox · · Score: 5
    In other news, the developers of Python have just received a letter from Digital Convergence demanding that they cease and desist making a "device capable of infringing on our IP." Company CEO J. Jovian Philyaw comments: "We really like the open source community, but if we don't defend our IP, we'll lose it! Because programs can be written in Python which utilize our IP, we must put a stop to the language." Unnamed members of the open source community responded with a quote which is not printable but which involved anatomically improbable actions involving goats.

    Note: The above is facetious and non factual. Except maybe the bit about the goats.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  9. Python 2.0b1 also due out today by Corvus · · Score: 5
    According to Guido here.

    That is all.