Slashdot Mirror


Guido van Rossum Unleashed

Here you go - answers to your questions for Guido van Rossum about Python, its future, licensing hassles with the Free Software Foundation, and other neat stuff. Thanks, Guido!

Ruby
by Luke

Thoughts on Ruby?

Guido:
I just looked it up -- I've never used it. Like Parrot, it looks like a mixture of Python and Perl to me. That was fun as an April Fool's joke, but doesn't tickle my language sensibilities the right way.

That said, I'm sure it's cool. I hear it's very popular in Japan. I'm not worried.

Data Structures Library
by GrEp

I love python for making quick hacks, but the one thing that I haven't seen is a comprehensive data structures library. Is their one in development that you would like to comment about or point us to?

Guido:
One of Python's qualities is that you don't need a large data structures library. Rather than providing the equivalent of a 256-part wrench set, with a data type highly tuned for each different use, Python has a few super-tools that can be used efficiently almost everywhere, and without much training in tool selection. Sure, for the trained professional it may be a pain not to have singly- and doubly-linked lists, binary trees, and so on, but for most folks, dicts and lists just about cover it, and even inexperienced programmers rarely make the wrong choice between those two.

Since this is of course a simplification, I expect that we will gradually migrate towards a richer set of data types. For example, there's a proposal for a set type (initially to be added as a module, later as a built-in type) floating. See http://lists.sourceforge.net/lists/listinfo/python-sets and http://python.sourceforge.net/peps/pep-0218.html.

[j | c]Python
by seanw

How do you see the relationship between jPython (the java implementation) and standard cPython (the original C language version) evolving? And do you see the advantages of either one (i.e. portability vs. speed) becoming especially pronounced in light of the recent trend toward distributed software (ala the MS .NET initiative)?

Guido:
Note that the new name is Jython, by the way. Check out www.jython.org -- they're already working on a 2.1 compatible release.

We used to work really close -- originally, when JPytnon was developed at CNRI by Jim Hugunin, Jim & I would have long discussions about how to implement the correct language semantics in Java. When Barry Warsaw took over, it was pretty much the same. Now that it's Finn Bock and Samuele Pedroni in Europe, we don't have the convenience of a shared whiteboard any more, but they are on the Python developers mailing list and we both aim to make it possible for Jython to be as close to Python in language semantics as possible. For example, one of my reasons against adding Scheme-style continuations to the language (this has seriously been proposed by the Stackless folks) is that it can't be implemented in a JVM. I find the existence of Jython very useful because it reminds me to think in terms of more abstract language semantics, not just implementation details.

IMO the portability of C Python is better than that of Jython, by the way. True, you have to compile C Python for each architecture, but there are fewer platforms without a C compiler than platforms without a decent JVM.

Jython is mostly useful for people who have already chosen the Java platform (or who have no choice because of company policy or simply what the competition does). In that world, it is the scripting and extension language of choice.

does Python need a CPAN?
by po_boy

One of the reasons I still write some things in PERL is because I know that I can find and install about a zillion modules quickly and easily through the CPAN repository and CPAN module. I'm pretty sure that if Python had something similar, like the Vaults of Parnassus but more evolved that I would abandon PERL almost entirely.

Do you see things in a similar way? If so, why has Python not evolved something similar or better, and what can I do to help it along in this realm?

Guido:
It's coming! Check out the action in the catalog-sig http://python.org/sigs/catalog-sig/. You can help by joining.

One reason why it hasn't happened already is that first we needed to have a good package installation story. With the widespread adoption of distutils, this is taken care of, and I foresee a bright future for the catalog activities.

Favourite Python sketch?
by abischof

Considering that you named the language after the comedy troupe, what's your favourite Monty Python sketch? Personally, my favourite is the lecture on sheep aircraft, but I suppose that's a discussion for another time ;).

Guido:
I'm a bit tired of them actually. I guess I've been overexposed. :-)

Conflict with GPL
by MAXOMENOS

The Free Software foundation mentions the license that comes with Python versions 1.6b1 and later as being incompatible with the GPL. In particular they have this to say about it:

This is a free software license but is incompatible with the GNU GPL. The primary incompatibility is that this Python license is governed by the laws of the "State" of Virginia in the USA, and the GPL does not permit this.
So, my question is a two parter:

1.What was your motivation for saying that Python's license is governed by the laws of Virginia?

2.Is it possible that a future Python license could be GPL-compatible again?

Guido:
Let me answer the second part first. I asked the FSF to make a clear statement about the GPL compatibility of the Python 2.1, and their lawyer gave me a very longwinded hairsplitting answer that said neither yes nor no. You can read for yourself at http://www.python.org/2.1/fsf.html. I find this is very disappointing; I had thought that with the 1.6.1 release we had most of this behind us, but apparently they change their position at each step in the negotiations.

I don't personally care any more whether Python will ever be GPL-compatible -- I'm just trying to do the FSF a favor because they like to use Python. With all the grief they're giving me, I wonder why I should be bothered any more.

As for the second part: most of you should probably skip right to the next question -- this answer is full of legal technicalities. I've spent waaaaaaaaay to much time talking and listening to lawyers in the past year! :-(

Anyway. The Python 1.6 license was written by CNRI, my employer until May 2000, where I did a lot of work on Python. (Before that, of course, I worked at CWI in Amsterdam, whom I have to thank for making my early work on Python possible.) CNRI own the rights to Python versions 1.3 through 1.6, so they have every right to pick the license.

CNRI's lawyers designed the license with two goals in mind:(1) maximal protection of CNRI, (2) open source. (If (2) hadn't been a prerequisite for my employment at CNRI, they would have preferred not to release Python at all. :-)

Almost every feature of the license works towards protecting CNRI against possible lawsuits from disappointed Python users (as if there would be any :-), and the state of Virginia clause is no exception. CNRI's lawyers believe that sections 4 and 5 of the license (the all caps warnings disclaiming all warranties) only provide adequate protection against lawsuits when a specific state is mentioned whose laws and courts honor general disclaimers. There are some states where consumer protection laws make general disclaimers illegal, so without the state of Virginia clause, they fear that CNRI could still be sued in such a state. (Being a consumer myself, I'm generally in favor of such consumer protection laws, but for open source software that is downloadable for free, I agree with CNRI that without a general disclaimer the author of the software is at risk. I'm happy that Maryland, for example, is considering to pass a law that makes a special exception for open source software here.)

Python 1.6.1, the second "contractual obligation release" (1.6 was the first), was released especially to change CNRI's license in a way that resolved all but one of the GPL incompatibilities in the 1.6 license. I'm not going to explain what those incompatibilities were, or how they were resolved. Just look for yourself by following the "accept license" link at http://www.python.org/1.6.1/. The relevant changes are all in section 7 of the license, which now contains several excruciating sentences crafted to disable certain other clauses of the license under certain conditions involving the GPL. Read it and weep.

The remaining incompatibility, according to the FSF, is the "click-to-accept" feature of the license. This is another feature to protect CNRI -- their lawyers believe that this is necessary to make the license a binding agreement between the user and CNRI. The FSF is dead against this, and their current position is that because the GPL does not require such an "acceptance ceremony" (their words), any license that does is incompatible with the GPL. It's like the old story of the irresistible force meeting the immovable object: CNRI's lawyers have carefully read the GPL and claim that CNRI's license is fully compatible with the GPL, so you can take your pick as to which lawyer you believe.

Anyway, I removed the acceptance ceremony from the 2.1 license, in the hope that this would satisfy the FSF. Unfortunately, the FSF's response to the 2.1 license (see above) seems to suggest that they have changed their position once again, and are now requesting other changes in the license. I'm very, very tired of this, so on to the next question!

Structured Design.
by Xerithane

First off, as a disclaimer I have never actually written anything in Python. But, I have read up on virtually all the introduction articles and tutorials so I have a grasp on syntax and structure.

I have been doing C development for 9 years now, and I know a plethora of other languages including shell scripting, perl, PHP (for scripts). Now, each language uses 'normal' grouping for control structures (if, for, etc).

What was the logic behind creating a whitespace-based syntax rule? And why do you feel it is good, please refrain from the readability answer because that is all I get from those people I know who know Python.

I find, because of my background, it is much easier to read code that uses braces ({}) than whitespace because my mind automatically looks for them. After maintaining legacy code that extends a life span of 20 years from it's first line of code, I have some concerns about the longevity of any Python code. So, my second question is, how well do you see Python holding up for 20 years and why do you think it will hold up that long?

Guido:
What's wrong with the legibility answer? I think that's an *excellent* reason! Don't care if your code is legible?

Don't you hate code that's not properly indented? Making it part of the syntax guarantees that all code is properly indented!

When you use braces, there are several different styles of brace placement (e.g. whether the open brace sits on the same line as the "if" or on the next, and if on the next, whether it is indented or not; ditto for the close brace). If you're used to code written in one style, it can be difficult to read code written in another. Most people, when skimming code, look for the indentation anyway. This leads to sometimes easily overlooked bugs like this one:

  if (x  10)
      x = 10;
      y = 0;
Still not convinced? In 1974, Don Knuth predicted that indentation would eventually become a viable means of structuring code, once program units were small enough. (Full quotation: http://www.amk.ca/quotations/python-quotes/page-1.html)

Still not convinced? You admit that you haven't tried it yet. Almost everybody who tries it gets used to it very quickly and end up loving the indentation feature, even those who hated it at first. There's still hope for you!

So, no, I'm not worried about Python holding out 20 more years.

What is *your* idea of Python and its future?
by Scarblac

There are a lot of "golden Python rules" or whatever you would call them, like "explicit is better than implicit", "there should be only one way to do it", that sort of thing. As far as I know, those are from old posts to the mailing list, often by Tim Peters, and they've become The Law afterwards. In the great tradition of Usenet advocacy, people who suggest things that go against these rules are criticized. But looking at Python, I see a lot more pragmatism, not rigid rules. What do you think of those "golden rules" as they're written down?

What's your idea of the future of Python? Since the PEP process, a lot of new feature ideas have been put forward, and a lot of people feel uncomfortable with quick change to a good language (Python 2.1 is again excellent though, congrats). Do you think or hope Python will be finished one day? If not, isn't the alternative an endless string of added features? "Python 3000" was an idea of a sort of ideal Python that would be worked on, but as I understand Python will now evolve more gradually.

Guido:
You're referring to the "Zen of Python", by Tim Peters: http://www.python.org/doc/Humor.html#zen

It's no coincidence that these rules are posted on the Python Humor page!

Those rules are useful when they work, but several of the rules warn against zealous application (e.g. "practicality beats purity" and and "now is better than never").

While we put "There's only one way to do it" on a T-shirt, mostly to poke fun at Larry Wall's TMTOWTDI, the actual Python Zen rule reads: "There should be one-- and preferably only one -- obvious way to do it." That has several nuances!

Regarding the future, I doubt that any piece of software ever stops evolving until it dies. It's like your brain: you never stop learning. Good software has the ability to evolve built in from the start, and evolves in a way that keeps the complexity manageable.

Python started out pretty well equipped for evolution: it was extensible at two levels (C extension modules and Python modules) that didn't require changing the language itself. We've occasionally added features to support evolution better, e.g. package namespaces make it possible to have a much large number of modules in the library, and distutils makes it easier to add third party packages.

I hear the complaints from the community about the rate of change in Python, and I'm going to be careful not to change the language too fast. The next batch of changes may well be aimed at *reducing* complexity. For example, there are PEPs proposing a simplification of Python's numeric system (like eradicating the distinction between 32/64-bit ints and bignums), and I've started to think seriously about removing the distinction between types and classes -- another simplification of the language's semantics.

Strangest use of Python
by Salamander

What use of Python have you found that surprised you the most, that gave you the strongest "I can't believe they did that" reaction?

Guido:
I find few things strange.

For the most obfuscated code I've ever come across, see the Mandelbrot set as a lambda, http://www.python.org/doc/FAQ.html#4.15.

Digital Creations has written a high-performance fully transactional replicated object database in Python. That's definitely *way* beyond what I thought Python would be good for when I started.

Some people at national physics labs like LANL and LLNL have a version of Python running on parallel supercomputers with many hundreds of processors. That's pretty awesome.

But my *favorite* use of Python is at a teaching language, to teach the principles of programming, without fuss. Think about it -- it's the next generation!

--Guido van Rossum (home page: www.python.org/~guido)

241 comments

  1. Re:Indentation syntax has its problems too by Anonymous Coward · · Score: 1

    "How will you know with just an indentation syntex. " [sic]

    Well, since indentation level dictates grouping

    if (x == 4) { x = 10;}
    y = 6;

    must be:

    if x == 4:
    x = 10
    y = 6

    whereas

    if (x == 4) {
    x = 10; y = 6;
    }

    must be

    if x == 4:
    x = 10
    y = 6

    I'm sorry, but to me it's as clear as day and completely unambiguous. You seem to have missed the point - that indentation level expresses the intent.

  2. Ruby by Anonymous Coward · · Score: 1

    Ruby isn't really cross between Perl and Python - sure it has elements of both and it is designed to be easy to move from Perl to Ruby. Actually, Ruby borrows heavily from Smalltalk but gives it a more 'familiar' syntax. Everything is an object in Ruby including literals, so you can actually say something like:
    "this string".length
    and it returns 11.
    Or you can make a loop such as:
    4.times { |i|
    puts i
    }

    and it prints: 1
    2
    3
    4

    To iterate through a hash in Ruby, you do:

    someHash.each { |key,value|
    #do stuff with key and value
    }

    That's an example of using a Ruby iterator, one of the nicer language features.

    Defining a class is straightforward:
    class MyClass
    @@numInst #class vars start with '@@'
    attr_accessor :x,:y,:z,:numInst
    def initialize(x,y,z="something")
    #constructor, gets called by 'new' #note: instance vars start with '@'
    @x = x
    @y = y
    @z = z
    @@numInst += 1
    end
    end

    inst1 = MyClass.new(1,2)
    puts "x = " inst2 = MyClass.new(3,4,"something else")
    puts "total number of instances"
    Note: the attr_accessor method above creates accessor methods for the variables in the list following it
    Anyway, Ruby is very cool check it out at:
    http://www.ruby-lang.org
    or:
    http://www.rubycentral.com

  3. Re:Braces vs Whitespace by cduffy · · Score: 1

    What editor do you use? If emacs, do you use python-mode?

    I'm honestly curious -- I've experienced none of these problems (or, at least, when I did it was obvious enough that I wouldn't remember it). Not a one.

  4. Re:Braces vs Whitespace by cduffy · · Score: 1
    Ah. Python simply doesn't have analogous problems -- it does away with the whole class.

    Try it. You'll like it.

  5. Re:Braces vs Whitespace by cduffy · · Score: 1

    Check the post mine was parent to -- I wasn't replying to you (nothing trollish about 'ya) but a rather rude AC, who did indeed mention productivity.

  6. Re:That's where code formatters come into play... by cduffy · · Score: 1
    I can think of other code formatting tools (like something that would turn tabs into 8 spaces) that might case problems if you had some lines with tabs and some with spaces (whcih I see all the time when a lot of people work on a file with different tools).

    Actually, Python does an excellent job of figuring out how many spaces you intend a tab to be. I say this from the point of view of someone who switched from emacs to vim about a year ago, and made some corresponding changes in code style and tab-versus-space usage (no longer doing things the way the emacs mode I was using insisted on). I can still edit my old python files -- and if they look right in the editor, they run correctly in the interpreter every time, mixed code or no.

    Thus, however delicate the whitespace-dependancy system may appear in theory, it's wonderfully robust in practice.

    As for having systems which let you format things the way you want... one of the nice things about Python is that it enforces a system which is readable by everyone. There's no more messing with reformatters or debating code styles -- there's one obvious style, And It Is Good. Frankly, I like that.

  7. Re:Indentation syntax has its problems too by cduffy · · Score: 1
    If you have a good editor (like emacs python-mode), it won't let you hit or fail to hit a tab key.

    Yup. It's sweet. Really. Try it.

  8. Re:Indentation syntax has its problems too by cduffy · · Score: 1
    I've no doubt it would be possible to write similar functionality for vim...

    but then, vim users *like* the pain, right? .

  9. Re:Braces vs Whitespace by cduffy · · Score: 2
    I've been writing python for the last few years, and I've never once had a bug due to whitespace issues.

    Not even once.

    I've in that time switched from emacs to vim (and, simultaniously, from 4-character to 8-character tabs). I am right now in the process of rennovating a program I wrote back in emacs with the 4-character tabs, and I've more than once used an 8-char tab in a program written in an utterly different style. Not only have I not gotten any bizarre error messages, I haven't gotten any error messages at all.

    I don't know what editor or settings you're using, but you're using it (them?) wrong.

    And, btw, the emacs python mode *is* clever. When I think about switching back to emacs, it's my number one motivation (I'll probably do it after emacs 22 is out -- isn't that the version slated for color syntax highlighting at the console?)

  10. Re:Braces vs Whitespace by cduffy · · Score: 2
    If you equate productivity with the end-of-block character choice, you've got one helluva messed up concept of programming.

    Python makes me fast not only because of its syntax, but also (and perhaps more importantly) its built-in data types, its weak typing system, and other behind-the-scenes work.

    Frankly, I'm inclined to call your post a troll.

  11. Re:Braces vs Whitespace by Tony · · Score: 1
    You *like* Mumps?

    Good God, no! I just have to program in it. Occassionally.

    One of MUMPS' problems is the blocking via indentation. It got so bad, they added the "." for explicit blocking-- as in:

    I $L(NDC)=11 D Q
    .S X=$$FINDNDC(NDC)
    .I X D
    ..N F S F=$P(^APSAMDF(X,2),"^",3)
    ..W:OUTPUT $$FMTNDC(NDC,5,4,2)," Format=",F,!
    .E W NDC," Not found",!
    W:OUTPUT "Test ",NDC,"..."

    You are right-- it's a holy war issue. My experience with indentation-as-blocking has not been good; doesn't mean it doesn't work for other people. Python is a great language... for other people.

    --
    Microsoft is to software what Budweiser is to beer.
  12. Re:Braces vs Whitespace by Tony · · Score: 1

    And MUMPS ignores it, since it is syntactically irrelevent-- there's no real scoping in MUMPS, so there's not even a hit for context switching.

    The bugs occur when editing code, when adding an outer loop and the code isn't properly re-formatted. Visually, it is harder to deal with a "running context" (that is, the leading white space means "include me in the previous block") instead of an SOB/EOB-marker context ("everything between the braces is a block").

    In communication, a statement is assumed to be related to the previous statement. In fact, we have a special phrase for statements that *don't* relate to the previous statement-- a "non-sequitor." When communicating, we have special markers for "start of topic," and "end-of-topic." Each sentence does *not* start with a marker that says, "I'm part of the same topic as the previous sentence."

    As long as your program chunks are short and to-the-point, whitespace blocking is okay. But not everything lends itself to short program blocks.

    --
    Microsoft is to software what Budweiser is to beer.
  13. Braces vs Whitespace by Tony · · Score: 2

    Excellent answers.

    But, I do have one quibble, the same quibble I've had with Python from the outset. Using whitespace blocking to mandate code structure forces the programmer to the language, and not the other way around. I like my code to fit my style.

    I program in MUMPS, a terse database/language written in the late sixties. It's a decent language, as far as that goes, but it also uses whitespace for blocking. I have seen more bugs due to stray spaces than misplaced braces (in C, Perl, etc). Plus, it makes it a pain in the ass when re-formatting huge blocks of code.

    Plus, it really *doesn't* make the code more readable. It merely forces the program to a particular style. And Mr. van Rossum's style is not mine. (Arguably, he does have better style than me.)

    --
    Microsoft is to software what Budweiser is to beer.
    1. Re:Braces vs Whitespace by Ian+Bicking · · Score: 2

      The problem isn't Python, it's vi. We all know Emacs is hands-down the superior editor (no, the superior GUI environment -- no, the superior OS). And Emacs matches whitespace in Python code. (It prints a message Closes 'if something:' when you close the block... and probably 20 other ways of dealing with blocks that I don't know the keycodes for).

    2. Re:Braces vs Whitespace by ptomblin · · Score: 2
      I have two problems with whitespace indentation:
      • No common text editor has a decent "go to the end of the block" function. They all have "go to the matching brace", though.
      • What happens when you have a line with 8 spaces followed by a line with a tab? I haven't used python, but one language I used that used whitespace indentation treated them differently, so you had lines that looked like they were indented the same, but the interpreter didn't think they were. Add in complications with people who have set their tab stops differently from you, and you might as well give up right now.
      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
    3. Re:Braces vs Whitespace by ptomblin · · Score: 2

      It's not the responsibility of a language to conform to the features offered by existing editors

      Maybe not in your dream world, but out here in the real world I have code to write, and it there is no editor that will skip to the end of a block in Python, but there is in every other language that I use, then I know what I'm going to choose.

      If Joe Schmoe puts in 8 spaces, followed by a tab, it's not Python's fault.

      Once again, the real world isn't that simple. Code gets lots and lots of different programmers working on it, over the course of years. And in every other language I use, tabs versus spaces are not an issue. So once again, I look at what has really happened in my 20 years of professional programming experience rather than what should happen in an idea world, see that it would cause major problems in Python, and decide not to choose Python for my next project.

      --
      The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
    4. Re:Braces vs Whitespace by Christopher+Craig · · Score: 1

      Ed is the standard Unix Editor

    5. Re:Braces vs Whitespace by William+Tanksley · · Score: 2

      I do a lot of sharing, and have for a long time in several languages. I've never spent much time correcting tabs, but I don't get these problems. In particular, I've never seen anything as bad as what you're saying -- the worst I get is seeing 8-space tabs when the file was formatted for 4-space.

      The standard solution in Python is to NEVER use tabs. It's also possible to get away with never using spaces in front of tabs; if you make a mistake that way, you'll see it immediately, and Python will produce an error.

      If you DO wind up with spaces in front of your tabs, get rid of your editor -- it's not worth the hassle. Then run Python with the tabnanny option (I think that's -t or -tt) to show you where the mistakes are.

      But again, I've never had any of this happen to me. I've never talked to any Python users who have. Python coders just don't ALLOW their code to get so sloppy, any more than C users would allow their code to contain misspelled function names. Why? Because the resulting code wouldn't compile.

      -Billy

    6. Re:Braces vs Whitespace by William+Tanksley · · Score: 2

      Keep in mind that Python's indentation/blocking rules are _totally_ different from MUMPS'. They don't have the same problems or benefits.

      -Billy

    7. Re:Braces vs Whitespace by William+Tanksley · · Score: 3

      Good concerns.

      Whitespace _by itself_ doesn't affect Python; only indentation does. The difference is that indentation is something that's done to visible stuff. It's almost impossible to hide an indentation.

      It's not completely impossible, though; that's why Python's unofficial rule is: "no tabs, and if you want to use tabs, never put spaces before a tab." This is good human advice anyhow.

      So in summary, there's nothing about Python's formatting which is invisible.

      Hope that helps.

      The post to which you're replying is claiming that tools should conform to the language rather than the language to the tools -- I'm a Python fan, but even I don't buy that. Python IS a tool, as is any language. If you're stuck with vi and Python makes it hard to indent using vi, then either Python, vi, or automatic indentation MUST GO. Personally, I've never had a problem, but to those who have, I completely respect their decision to toss out any of the three, even my favorite one.

      Of course, that doesn't mean I have to agree when they start badmouthing Python because they chose to toss it out in their one narrow case.

      -Billy

    8. Re:Braces vs Whitespace by Zagadka · · Score: 1

      I've never run into this problem in all the years I've been writing Python code, so your editor settings are probably to blame.

      If you have your tab spacing set to 8 (which it should be) then you can mix tabs and spaces willy-nilly, and Python will still understand what you mean. It's only if you have tabs set to something other than 8 and you mix tabs and spaces, that you would run into problems.

      In Vim, if you want to be extra careful, you can turn on expandtab. ie:

      set expandtab

      You can also turn on "list" mode, and run "retab" if you're editing code you're not sure about. And you should of course have ts set to 8.

      These setting are also handy for other things that care about indentation, like Makefiles and Perforce files.

      I don't use Emacs, but there's presumably similar things you could do there.

    9. Re:Braces vs Whitespace by Zagadka · · Score: 2

      My editor -- nedit -- allows me to select a region of text and shift its indentation in our out as a unit.
      ...
      Vi doesn't.


      Vi does support shifting the indentation of blocks of text. You clearly never graduated from the "if I can't learn it in 5 minutes it can't be any good" school of thought.

      Try using the < or > keys in normal mode. You can also use those keys in combination with any movement command or object selection command to shift in/out the appropriate chunk of text. Indentation is based on the setting of shiftwidth.

      In Vim you can also visually select a block (hit V then move around, or use the mouse to select) and then hit < to outdent or > to indent.

    10. Re:Braces vs Whitespace by david.given · · Score: 2
      I program in MUMPS, a terse database/language written in the late sixties. It's a decent language, as far as that goes, but it also uses whitespace for blocking. I have seen more bugs due to stray spaces than misplaced braces (in C, Perl, etc). Plus, it makes it a pain in the ass when re-formatting huge blocks of code.

      Remember the Golden Rule of Programming:

      There is no language in which it is the least bit hard to write incorrect programs.

      I use Python a lot. I use C a lot. As far as I'm concerned, the indentation issue is a non-starter --- you're going to indent your code *anyway*, otherwise you're not worthy of that paycheque. In C you have a bit of extra effort involved placing braces correctly. In Python you have a bit of extra effort involved getting the indentation right. When all's said and done, there's equal effort involved in each approach.

      Remember: you cannot enforce good programming. You can only help. Python's pervasive dynamicity, data structures, class structures, module library all help good programming *far* more than the indentation style.

    11. Re:Braces vs Whitespace by tuffy · · Score: 1
      The main problem, though, is long lines of code. What do you do when you hit the 80 character mark? The JavaScript implementation sucks, it's no good if wrapover is also valid on its own... That's the annoying bit.

      In Python, you can wrap code into another line by appending \ at the end of it. Or, if the syntax is unambiguous, even the \ can be dispensed with. For example:

      1 + 2 + \
      3

      Is okay, as is:

      1 + (2 +
      3)

      But:

      1 + 2 +
      3

      will cause complaint.

      --

      Ita erat quando hic adveni.

    12. Re:Braces vs Whitespace by tuffy · · Score: 1
      This must be some definition of "lots of work" I was unaware of ;)

      In practice, most of the stuff that goes over 80 chars are long lists or function calls, which don't need the \ thingy whatsoever. But, in general, Python tends to reuse the basic syntax for lots of things and so it hasn't exhausted the list of special characters yet - I figure we can spare the \

      :)

      --

      Ita erat quando hic adveni.

    13. Re:Braces vs Whitespace by Dr.Dubious+DDQ · · Score: 2
      Would you bitch and moan at C if some programmer decided he wanted to use straight braces instead of curly ones?

      That wouldn't be the same thing, though, as curly braces are used in a few specific places, while spaces and tabs get used all throughout a program - whitespace separates EVERYTHING. I think people who dislike the whitespace-sensitivity tend to balk because of this, the same way they might balk if spaces were replaced with curly braces: function{some_code(int{some_variable,int{some_othe r_variable){
      {{{{{
      {{{{{if{(some_variable>some_other_variable)
      {{{{{{{{{{return{1;}
      {{{{{else
      {{{{{{{{{{return{0;}
      {{{{}
      Which braces are "separaters" and which are "block definers"? Even in this silly example, it should be relatively obvious if you LOOK at it, but it's not "intuitive".
      I can understand where using whitespace, which is already used trivially throughout the code, to also represent something as significant as what constitutes a code block can be disturbing to some people...

      For one thing, different tab stops screw up virtually every language, not just Python.

      Only in terms of how "pretty" the source code is - none of the languages I've ever worked with (not that there are that many, nor that I'm a "master" of any of them, but...) actually had any problems due to varying tab sizes when it came time to actually compile and/or run the program

      In other words, I think the problem is fundamentally that people who don't feel comfortable with Python mainly dislike the way it almost fits the definition of a bondage-and-discipline language (except that I think the amount of useful stuff being written in Python easily disproves the "demonstrably inadequate for...even vanilla general-purpose programming" clause, regardless of whether I dislike the syntactical quirks of the language or not:-) ) and don't like feeling so constrained.


      ---
    14. Re:Braces vs Whitespace by elmegil · · Score: 1
      It's not completely impossible, though; that's why Python's unofficial rule is: "no tabs, and if you want to use tabs, never put spaces before a tab." This is good human advice anyhow.

      If it's only an unofficial rule, it's going to be easy to fall afoul of it.

      Of course I would never badmouth Python on such shaky grounds though :-).

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    15. Re:Braces vs Whitespace by elmegil · · Score: 1

      In my experience, mis-delimited blocks are one of the biggest sources of weird problems, at least when I'm writing code in a hurry.

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    16. Re:Braces vs Whitespace by elmegil · · Score: 1

      I use vi exclusively, and I did mention early on that I don't do Python, so I did not mean to imply that my issues with mis-delimited blocks were in Python. I was speaking generally of the various languages I do use; typically the problem is forgetting a brace, which is easy enough to find when I realize my mistake.

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    17. Re:Braces vs Whitespace by elmegil · · Score: 1

      Perl makes me fast for similar reasons (I would substitute premade modules to do darn near everything for the built in data types though). Where did I say anything about productivity? I simply said that in whatever langauges I've programmed in, bad delimiters (missing quotes, braces, etc) are the source of more "weird" errors than anything else. At least when I have braces for blocks, I can use built in editor functions to check my brace balancing. Can't do that effectively with whitespace, and when I wrote all this it was not clear how forgiving or not forgiving Python might be. Other posts have clarified that.....

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    18. Re:Braces vs Whitespace by elmegil · · Score: 2
      I suppose I could have gone on at some greater length about how *I* can't even necessarily match white space visually. Being uncertain of exactly how Python uses white space (I'm a Perl geek), I would suppose that there are means of formatting Python that are not immediately obvious to the naked eye. While that's also true of braces, at least I have editor functions to help me with braces. And if it were anything but whitespace, I *could* probably program vi to help me identify the delimiters.

      Beyond that, at least braces are printable characters--I think it is important to focus the language on what can be seen rather than what is omitted or "invisible" in some sense, and I like the fact that most of the languages I program in are free form about white space (C, perl, shell).

      Whitespace does doesn't seem to me to lend itself to ease of use as an active formatting element--what about environments that map tabs to 4 spaces instead of 8, what about (hypothetical) environments where tab doesn't even do what you'd expect, or requires tab settings to be made before use, etc. It seems to easy to get an extra space or tab in there where it could actively hurt you without being obvious to observe.

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    19. Re:Braces vs Whitespace by elmegil · · Score: 5

      The bottom line: my vi editor, and I'm sure someone else's EMACS editor, allow me to match braces with a keystroke. While there may be some way to program EMACS to do the same for white space delimitations, I can't imagine finding a way to do that in vi. Considering which of these is the "standard" Unix editor, that seems like a big flaw.

      --
      7 November 2006: The day Americans realized corruption and incompetence weren't addressing 11 September 2001
    20. Re:Braces vs Whitespace by Xerithane · · Score: 1
      Uhm, what in the hell are you talking about?

      You have not read the article, or the entire thread.. or the previous thread on the question board have you?

      If you have, then wow am I missing the point.. or you are. I'm voting more that you are.

      --
      Dacels Jewelers can't be trusted.
    21. Re:Braces vs Whitespace by Xerithane · · Score: 1
      The difference, is in the design. If you design something that only works 99% of the time, but fails 1% of the time it's wrong. Period.

      If you design something that *should* work 100% of the time but in reality only works 99% of the time it's not a hack, but poor implementation.

      --
      Dacels Jewelers can't be trusted.
    22. Re:Braces vs Whitespace by mengel · · Score: 1
      Moderators! Mod the preceding up! Nothing like a real existence proof to settle a question!

      Computing is the only field in which we consider adding a wing to the building to be maintenance.

      --
      - "History shows again and again how nature points out the folly of men" -- Blue Oyster Cult, 'Godzilla'
    23. Re:Braces vs Whitespace by Sloppy · · Score: 2

      I like my code to fit my style.

      And that's good for when you want to read your code. But style is bad for the general case of $programmer_y wanting to read $programmer_x's code. You address the first problem at the expense of the second. Python addresses the second problem at the expense of the first.

      Plus, it makes it a pain in the ass when re-formatting huge blocks of code.

      Interestingly, he specifically mentioned Knuth's condition: "once program units were small enough." Thus Python doesn't just make your code look a certain way, but also uh .. "encourages" .. you to structure your code a certain way. (e.g. Lots of of little subroutines instead of long blocks with ifs nested 20 levels deep.) Now individual style is really going out the window...


      ---
      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    24. Re:Braces vs Whitespace by Shadowlion · · Score: 1

      But is this the fault of the language, or the fault of the editor?

      As much as I love vi (and I do love vi), this strikes me as more a deficiency of the editor rather than a problem with the language. Languages should not conform to the available tools, but instead the available tools should adapt to incorporate new language concepts.


      --

    25. Re:Braces vs Whitespace by Shadowlion · · Score: 1

      No common text editor has a decent "go to the end of the block" function. They all have "go to the matching brace", though.

      It's not the responsibility of a language to conform to the features offered by existing editors. In fact, it's just the opposite: editors exist to help edit, and as a result are responsible for adapting to new languages (that is, assuming you want that editor to help the user program more efficiently).

      What happens when you have a line with 8 spaces followed by a line with a tab? I haven't used python, but one language I used that used whitespace indentation treated them differently, so you had lines that looked like they were indented the same, but the interpreter didn't think they were. Add in complications with people who have set their tab stops differently from you, and you might as well give up right now.

      For one thing, different tab stops screw up virtually every language, not just Python.

      As for your first case, Python probably spits out an error. But it's analogous to asking, "What happens if instead of curly braces in C, you put in square braces?" Tabbing is defined as something that matters by the _language_, and if you don't do what the language tells you, it's not the language's fault your code doesn't run!

      If Joe Schmoe puts in 8 spaces, followed by a tab, it's not Python's fault. Schmoe should've known that spaces are illegal characters (at least as he is using them). You don't bitch and moan about Python's "inability" to ignore whitespace, you bitch and moan at Joe! (Would you bitch and moan at C if some programmer decided he wanted to use straight braces instead of curly ones?)

      --

    26. Re:Braces vs Whitespace by Shadowlion · · Score: 1

      Maybe not in your dream world, but out here in the real world I have code to write, and it there is no editor that will skip to the end of a block in Python, but there is in every other language that I use, then I know what I'm going to choose.

      If you're judging the use of a language based on a single issue with the language, your reality is even more absurd than my dream world. Frankly, by the time you get to looking at the issue of whitespace actually possessing meaning, you should already know whether Python is the language to use.

      And if you don't, then chances are you're simply considering Python for novelty's sake - in which case, you probably are just better off sticking to your original programming languages.

      I can't think of a single instance in which choosing a language for a particular project would hinge soley on whether or not editors supported jumping to the end of a block.
      --

    27. Re:Braces vs Whitespace by flink · · Score: 1

      Wow, another M programmer!
      Isn't scoping what the NEW command is for? If you use the argumentsless DO command, you can even get dynamic scoping.

      TEST
      W !,$ZV
      N X
      S X=4
      W !,X
      D
      . N X
      . S X=5
      . W !,X
      W !,X

      D TEST

      Produces:

      Open M [ISM] for OpenVMS V7.x (Alpha) 6.4-F.12 (build-02) 11-MAY-1998 14:15:01.6
      4
      5
      4


      Granted stuff like
      N X S X=5
      FS X=$O(^GLOB("TEST",X)) Q:X=""D
      . ;;STUFF

      Can be tricky to parse at a glance ;-)

    28. Re:Braces vs Whitespace by magic · · Score: 2
      Python's biggest shortcomming (and I'm a Python programmer) is the whitespace issue. I like the idea of using indentation alone for control flow, but man, 90% of all bugs are because of tabs vs. spaces, one too many spaces, etc. And you always get a bizarre error message.

      We need an Emacs Python mode that doesn't allow tabs and does something clever like only allowing indents to be a multiple of 2 (or 4-- when whitespace is significant, you want to indent further).

      -m

    29. Re:Braces vs Whitespace by pthisis · · Score: 2
      there's no way (that I know of) to put an RSA Python script in a 4-line sig block

      Try this.


      from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
      '-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l -d,l-1+d
      while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
      lambda x,y:(x>8*i&255),range(o-1,-1,-1)))

      It's Andrew Kutchlings, from http://www.cypherspace.org/~adam/rsa/python.html

      Sumner

      --
      rage, rage against the dying of the light
    30. Re:Braces vs Whitespace by Richard+Jones · · Score: 1
      Well, I tried to post a Python version of the block movement code, but slashdot's lame lameness filter blocked it. I guess it detects Python code and rejects automatically or something. Anwyay, here's a URL:

      http://www.bofh.asn.au/~richard/vim_block_move.py

    31. Re:Braces vs Whitespace by Patrick+Lewis · · Score: 1
      From the Python Style Guide (I couldn't find a more authorative reference, although I believe there is one.)

      One indentation level is 4 spaces. Two levels is one tab. Three levels is a tab and 4 spaces, and so on. Python doesn't mind if you indent one line with 8 spaces and the next line with a tab -- they are considered to have the same indentation.

      So using your example of 8 spaces with 1 tab, Python won't complain. Go ahead and try a simple program, interspacing 8 spaces with tabs. Python doesn't complain.

      --
      "If I am such a genius, how come that I am drunk and lost in the desert with a bullet in my ass?" --Otto (Malcom ITM)
    32. Re:Braces vs Whitespace by Patrick+Lewis · · Score: 1
      Languages that force you to conform to one particular style went out with FORTRAN. Deal.

      There are lots of Python programmers who actually like whitespace formatting, and others who like the language despite it. Deal.

      --
      "If I am such a genius, how come that I am drunk and lost in the desert with a bullet in my ass?" --Otto (Malcom ITM)
    33. Re:Braces vs Whitespace by Russ+Nelson · · Score: 2

      There are multiple brace styles. There are not multiple indentation styles. It is indentation (which everyone agrees is good) that makes it a pain in the ass when re-formatting huge chunks of code.
      -russ

      --
      Don't piss off The Angry Economist
    34. Re:Braces vs Whitespace by segmond · · Score: 2

      Actually, you just shot yourself in the foot with that comment, who needs to mtch braces when you can just look at the screen and see where your block of code begins and ends!!!! When I am modifing poorly written C, or C++ code that is not formatted correctly, I find that useful, but if it had been in python, I would not have to worry about that in the first place!

      --
      ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
    35. Re:Braces vs Whitespace by jazman_777 · · Score: 1
      And that's good for when you want to read your code. But style is bad for the general case of $programmer_y wanting to read $programmer_x's code.

      Well, the only thing two programmers can agree on is how a third programmer's style is wrong. Python is the solution to that age-old problem.
      --

      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    36. Re:Braces vs Whitespace by 1010011010 · · Score: 2

      My editor -- nedit -- allows me to select a region of text and shift its indentation in our out as a unit. Jcc ("Code Crusader") also allows me to do this. As does Visual Studio's editor, when I have to use it.

      Vi doesn't. But I only use vi when I have to. I never want to.

      - - - - -

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    37. Re:Braces vs Whitespace by 1010011010 · · Score: 2

      Try using the < or > keys in normal mode. You can also use those keys in combination with any movement command or object selection command to shift in/out the appropriate chunk of text. Indentation is based on the setting of shiftwidth.

      Thanks! I appreciate the help.

      You clearly never graduated from the "if I can't learn it in 5 minutes it can't be any good" school of thought.

      Fuck you! You clearly never graduated from the "I get to be an intolreable prick because it makes me feel better about my own suprtiority" school.

      In Vim you can also visually select a block (hit V then move around, or use the mouse to select) and then hit to indent.

      Thanks! That's useful. I still won't be using vi for my day-to-day editing.

      - - - - -

      --
      Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
    38. Re:Braces vs Whitespace by QuoteMstr · · Score: 1

      There are no editors that use six spaces as the default. If the user changes that, then he should be concious of what he is breaking.

    39. Re:Braces vs Whitespace by bnenning · · Score: 1

      I stand corrected. I should have known better than to make a claim of the form "task X cannot be done in language Y in fewer than Z lines" on Slashdot...

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    40. Re:Braces vs Whitespace by bnenning · · Score: 2
      But, I do have one quibble, the same quibble I've had with Python from the outset. Using whitespace blocking to mandate code structure forces the programmer to the language, and not the other way around. I like my code to fit my style.

      I agree completely. Guido says "Don't you hate code that's not properly indented?", and I do. I also don't like reading code that is poorly documented, doesn't use descriptive identifier names, or uses 300 line methods that should be broken up. However I would be very annoyed if a compiler were to refuse to compile code without comments, or forbid variable names of less than 6 characters, or limit methods to 50 lines. Maybe this is a result of my libertarian views; I don't want a nanny state, and I don't want a nanny compiler.

      And more importantly, there's no way (that I know of) to put an RSA Python script in a 4-line sig block...

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
    41. Re:Braces vs Whitespace by Doc+Hopper · · Score: 2
      I must disagree with your statement "No common text editor has a decent 'go to the end of the block' function." I use an exceptionally common editor (emacs) and in Python major mode skipping to the end of the block is as easy as "C-M-e". Also I *never* have a problem with Emacs in Python mode -- all my indentation is handled completely transparently. It sees that I'm starting a block and handles my indentation automatically, and leaving the block is as simple as hitting the backspace key.

      If I understand correctly, the PythonWin IDE for MS Windows also includes this functionality. Your first argument is a straw man and factually incorrect.

      Your second argument regarding spacing problems simply happens very rarely in Python. There is one indentation style (with the exception that the number of spaces is variable), and using such simple tools as Tab Nanny nips them in the bud. Just like C programmers remember to curly brace correctly, Python programmers indent correctly.

      Anyway, interesting language war thread. I use Python and Perl extensively in my work, and find Python eminently more readable. It is also far easier to maintain, and is my language of choice for prototyping most new applications these days.

      Matt Barnson

    42. Re:Braces vs Whitespace by Ramses0 · · Score: 1

      :help >
      :help shiftwidth

      Go to any single line of code, and do ">>" to indent it, or "" or "" to shift.

      Enjoy.

      --Robert

    43. Re:Braces vs Whitespace by Ramses0 · · Score: 3

      Whee that was a fun way to learn vim scripting syntaxes. Save the following out to a text file, like ~/pymove.vim and do a :source ~/pymove.vim from within vim. Magically, the ",u", or ",d" keystrokes will move you up and down based on indentation. It could use some work but *I* think it's kindof cool. :^)=

      :":source ~/GPL.txt, etc...
      :func! Safeup()
      :if line('.') != 0
      : return line('.') - 1
      :else
      : return line('.')
      :endif
      :endfunc
      :func! Safedown()
      :if line('.') != line('$')
      : return line('.') + 1
      :else
      : return line('.')
      :endif
      :endfunc
      :func! Moveup()
      : let new_line = Safeup()
      : exec ':' . new_line
      : let first_indent = indent( line('.') )
      : while indent( line('.') ) == first_indent || indent( line('.') ) > first_indent
      : let new_line = Safeup()
      : exec ':' . new_line
      : endwhile
      : return( new_line )
      :endfunc
      :func! Movedown()
      : let new_line = Safedown()
      : exec ':' . new_line
      : let first_indent = indent( line('.') )
      : while indent( line('.') ) == first_indent || indent( line('.') ) > first_indent
      : let new_line = Safedown()
      : exec ':' . new_line
      : endwhile
      : return( new_line )
      :endfunc
      :
      :" moves the cursor to position found by 'Movedown()'
      :map ,d :exec ':' . Movedown()
      :" moves the cursor to position found by 'Moveup()'
      :map ,u :exec ':' . Moveup()

      --Robert

    44. Re:Braces vs Whitespace by smallpaul · · Score: 1

      I edit Python in VI (well, VIM) every day. It isn't very difficult.

      We're talking about a programming language here. Don't you think that there are bigger issues than end of block delimiters? Polymorphism. Extensibility. Zen?

    45. Re:Braces vs Whitespace by captredballs · · Score: 1

      OH! Maybe because you want to use your computer!

      Jeez, you Anonymous cowards outta think about these questions!!

      --

      I suppose I'm not too threatening, presently, but wait till I start Nautilus
    46. Re:Braces vs Whitespace by Devil's+Avocado · · Score: 1

      """
      ... I can imagine lots of bugs with inconsistent spaces.
      """

      Funny, a lot of people can *imagine* those bugs and almost *nobody* who actually *uses* Python instead of whining about whitespace runs into them.

      -DA

    47. Re:Braces vs Whitespace by Devil's+Avocado · · Score: 1

      """
      Let me highlight the keywords in your statement that cause me apprehensive to use this language.
      """

      Reading Slashdot posts sounds like a good, rational basis for deciding whether or not to use a language. Myself? I usually try to write some code in the language. I also prefer to reserve my apprehension for design flaws that cause recurrent and serious problems. Do you really consider the possibility that you may have to change your editor's tab settings once to be such a grave problem?

      """
      A lot of people: who most of which are intelligent (programmers are typically unstupid.)
      """

      You haven't worked with many programmers, have you. They come in every make, model, and color, including stupid, lazy and opinionated. The point, which you seem to have completely missed, is that these "intelligent" people who have never actually *tried* Python spend a great deal of time and energy complaining about a feature that nobody who *has* used the language seems to have any problem with. This leads me to suspect that these people are relying on prejudice to judge the issue. "If C/Perl/Bash doesn't do it that way then it must be broken" is not an intelligent line of criticism.

      """
      imagine: Coming up with logical scenarios as to where this would happen, or have experienced scenarios.
      """

      No, imagined does not equal experienced, and imagined does not imply logical. In fact, imagined, as I used it, implies *not* experienced.

      """
      almost nobody: yes, but there are some.
      """

      You're right -- there are some people who have experienced whitespace related syntax errors (and since the compiler catches them and screams bloody murder they corrected them in seconds flat). You know what else? There are "some" people who have forgotten to add braces when a one-line for loop in C became a two-liner. There are "some" people who find Perl's syntax hard to read. There are some people who experience dry mouth, irritable bowels, and nausea when given a sugar pill.

      What's your point? Python is fundamentally flawed because "some" people make syntax errors?

      """
      If a solution is only good 99% of the time, it isn't a solution but a hack.
      """

      Let me know when you make any real-world design decision that solves any problem 100% of the time.

      -DA

    48. Re:Braces vs Whitespace by SilentTristero · · Score: 1

      So why not write a preprocessor that turns braces into proper indentation? You could write it in python...

    49. Re:Braces vs Whitespace by belroth · · Score: 1
      I can't think of a single instance in which choosing a language for a particular project would hinge soley on whether or not editors supported jumping to the end of a block.
      But it is a very obvious feature of the language and one of the first things people notice/talk about - hence this whole thread. That being so it is a disincentive to investigate further- why bother finding out more when there are other languages which don't have this (perceived) disadvantage.

      Most things are possible in most languages, the issue is whether a language makes a particular task easy or hard. It is possible to write a wordprocesser in Fortran,for example, but you'd have to be a bit masochistic to want to try. If using python is harder than using another language because of the tools, that still makes it harder to use....
      ----

      --
      I hereby inform you that I have NOT been required to provide any decryption keys.
    50. Re:Braces vs Whitespace by vague · · Score: 1
      Braces don't do one bit to help the programmer understand the code that indentation doesn't do better. And yet they're an additional source of worry. Python is beutiful and the whitespace issue is a language advantage. It's that simple.

      -

      --

      -
      Listen. Strange women lying in ponds distributing swords is no basis for a system of government.

    51. Re:Braces vs Whitespace by Fencepost · · Score: 2
      [In MUMPS,] "I have seen more bugs due to stray spaces than misplaced braces"

      When you try to run a program with inconsistent spacing, python will complain about it - the simple program:
      print "First Line"
      print "Second Line"
      will cause an error when you try to run it, because the second line isn't indented properly.

      There's also tabnanny, a standard module that's designed to check for inconsistent indentation. From its doc string: "The Tab Nanny despises ambiguous indentation. She knows no mercy."

      -- fencepost

      --
      fencepost
      just a little off
    52. Re:Braces vs Whitespace by wpeterso · · Score: 1

      Mod the parent up. It seems like a lot of the conversation about style (braces vs. whitespace) relates to basic human cognition... Some prefer to see nothing while others want to see something.

    53. Re:Braces vs Whitespace by rattdot · · Score: 1

      Agreed... whitespace blocking makes me think of --- horror of horrors --- VB. Thus it must be bad, right? ;)

    54. Re:Braces vs Whitespace by Nohea · · Score: 1

      Aren't tabs vs. spaces the reason the makefile format is universally hated?

    55. Re:Braces vs Whitespace by connorbd · · Score: 2

      You *like* Mumps? I put it slightly higher than Befunge for readable...

      I suspect forced indentation is something of a holy war issue. I'm repulsed by it myself but I can see it having advantages that don't necessarily apply to me. I really don't think it's a visual ergonomics issue at all, just a question of personal taste. (Of course, I happen to consider PostScript syntax to be elegant, so who am I to talk?)

      /Brian

    56. Re:Braces vs Whitespace by Abreu · · Score: 1
      You say you are not going to try a solution just because you dislike a /. poster's way of advocating it?

      Sorry, but that didnt sound very intelligent.

      I would rather go to python.org and read the docs, download the interpreter and play a bit with it... I've done it with a couple of languages I didnt eventually like, but now at least I have first person experience and not just bias.

      If you want somebody elses opinion on Python, you would perhaps want to hear Eric S. Raymond's , published on Linux Journal.

      ------
      C'mon, flame me!

      --
      No sig for the moment.
    57. Re:Braces vs Whitespace by Abreu · · Score: 1
      here you base your criticism of python on the posters way of advocating it.

      I was just saying that instead of basing your biases on /. postings you should go and find out for yourself why python has gained so much popularity of late.

      ------
      C'mon, flame me!

      --
      No sig for the moment.
    58. Re:Braces vs Whitespace by Abreu · · Score: 1
      I wont reply to you no more, its obvious that you are incapable of educated conversation.

      ------
      C'mon, flame me!

      --
      No sig for the moment.
    59. Re:Braces vs Whitespace by groomed · · Score: 1
      Indentation should help the programmer to understand the code. It should not be an additional source of worry.

      With C, you can derive the indentation from the program text, and if the indentation is wrong, you know there is a problem with the program text. With Python, you have to supply the indentation, and if your program doesn't run, you know there might be a problem with the indentation.

    60. Re:Braces vs Whitespace by groomed · · Score: 1

      If you feel that way. I beg to differ.

    61. Re:Braces vs Whitespace by keesh · · Score: 2

      Didn't he also say that we should all go and learn how to code in machinecode if we have more than a casual interest in computers? Or was that someone else?

      The main problem, though, is long lines of code. What do you do when you hit the 80 character mark? The JavaScript implementation sucks, it's no good if wrapover is also valid on its own... That's the annoying bit.

    62. Re:Braces vs Whitespace by keesh · · Score: 2

      Lots of work though, and a waste of a special character... Yeah, OK, I use Perl, I like character soup :)

    63. Re:Braces vs Whitespace by wmulvihillDxR · · Score: 1

      Not to mention what happens when you edit your Python programs across different text editors AND different platforms. I've already run into many character mapping problems with OSX transfers. Tabs and spaces can get mangled differently by different text editors too!

      --
      Check out Althea for a stable IMAP email client for X. Now with SSL!
    64. Re:Braces vs Whitespace by quantum+bit · · Score: 1

      Let's see if the rule holds up:

      I'll bet nobody can fit a webserver written in Java in a 4-line Slashdot sig.

      Good luck! ;)

      Unix: Where /sbin/init is Job 1

    65. Re:Braces vs Whitespace by quantum+bit · · Score: 1

      If you're using Vim, try this:

      :set listchars=tab:
      :list

      That should make it pretty clear which indents are tabs and which are spaces :)

      (In case some browsers mangle the extended characters, I'm using the vt100 double-right-arrow and centered dot; but you can pick anything you like :)

    66. Re:Braces vs Whitespace by quantum+bit · · Score: 1

      Not that I consider it to be a great text editor or any sort of authority in the matter, but the MS Visual Studio editor uses 4-space tab stops by default.

      And though I can't remember the name, I swear back in my DOS/DJGPP days I used a text editor that defaulted to 6-space tabs. There are also (broken, IMHO) editors which will convert ALL tabs to spaces when saving.

      Sharing C code with people who use editors like these is difficult enough; I can't imagine working with them in a language where indentation is critical.

    67. Re:Braces vs Whitespace by quantum+bit · · Score: 2

      In the immortal words of an Anonymous Coward: "Emacs is a nice OS - but it lacks a good text editor. That's why I am using Vim."

    68. Re:Braces vs Whitespace by gunga · · Score: 1

      Well obviously this feature will stay in Python, so there's no use discussing it for ages.

      If it prevents you from coding, fine they're are other languages that share some of Python's most interesting features.

      I honestly can't see the interest of this discussion, I'm not telling anyone to shut up of course, but you don't have to use Python if it don't suits you.

    69. Re:Braces vs Whitespace by dachshund · · Score: 1
      As far as I'm concerned, the indentation issue is a non-starter

      I have yet to use Python, and reading about this issue has made me a little bit nervous about starting.

      One of the more irritating problems I encounter when sharing code between Windows and Unix machines (not to mention various text editors) is the inconsistent indentation. This is mostly due to bad text editors interpreting tabs differently. A few CVS checkins later, code can look like it was hit with a shotgun blast. Now this is basically cosmetic with C and Java, but from what you're saying it could be fatal for Python code. Am I mistaken?

    70. Re:Braces vs Whitespace by Mr.+Fred+Smoothie · · Score: 1
      I think you missed the point; 8 spaces and 1 tab are visually indistinguishable on Unix. The problem is when Joe does '>>' on his lines in vi (shifting over 8 spaces), but then I do 'tab' in mine when editing Joe's code. I can't see the difference. So I don't know that something's wrong until the interpreter chokes and informs me of the discrepancy. If I'm lucky, my additions to Joe's code will actually cause the interpreter to fail (i.e., it will cause a syntatic error).

      If I'm unlucky, I will have just introduced a subtle bug that neither the interpreter, nor my own eyes, can catch (i.e., proper syntax, invalid semantics).

      --

    71. Re:Braces vs Whitespace by fors · · Score: 1

      You do realize you just called every programming language known to man (including machine language) a hack.

      --
      "If there is nothing you are willing to die for, then you are not really alive." Myself
    72. Re:Braces vs Whitespace by ThirdOfFive · · Score: 1

      Go ahead and try a simple program, interspacing 8 spaces with tabs. Python doesn't complain.

      Ok, now display your code on in an editor that thinks one tab = six spaces. Now you can't read the code because you can't tell where the block actually ends.

      Or, worse, try to edit code in one of these editors. You hit tab to indent, but that only produces six spaces. So, you add two more spaces after the tab, making Python think that that particular line is in a new block.

      Languages that force you to conform to one particular style went out with FORTRAN. Deal.

      --

      --
      Home is where you hang your @.

    73. Re:Braces vs Whitespace by snoop_chili_dog · · Score: 1

      The problem is that most people would rather worry about the content of their program than the inanities of style. As long as you have a recognizable style, why should you worry if it's 4 spaces or 8? The point is to write a program isn't it?

      --
      But Yogi, the RIAA won't like that.
    74. Re:Braces vs Whitespace by Tech187 · · Score: 1

      Clearly you've not written much machine code.

    75. Re:Braces vs Whitespace by Tech187 · · Score: 2

      Modularity is one of the strong features of Python. Perhaps that reinforces the relevance Knuth's quote.

    76. Re:Braces vs Whitespace by Tech187 · · Score: 2

      Hmmm,

      I had two xterms open here on my NT4 box here at work. One open to a Solaris box, one to my captive (two-machine subnet composed of a crossover cable) NetBSD box (Net-help doesn't know about it, hooray!). On both command lines I was able to type ed and enter an editor.

      It isn't my editor of choice, but it's indeed the standard editor on Unix. If you've got a Unix-like system that doesn't have 'ed' on it, you've got a broken distribution.

    77. Re:Braces vs Whitespace by Ixokai · · Score: 1

      Actually, the interpreter would raise a SyntaxError exception. It doesn't care what you use -- spaces, or tabs, or how many spaces... all it expects is consistancy.
      And if you are inconsistant, it is a syntax error, and it will tell you about it.

    78. Re:Braces vs Whitespace by Ixokai · · Score: 1

      The thing is -- these problems don't occur. You don't get 'subtle errors' that are hard to find from improper indentation.. you get glaring syntax errors that tell you exactly where you have to fix the problem.
      Its *far* easier to screw up a complicated logical structure with a missing } and *far* harder to find just where that is, then to look over a Python script with a line improperly indented and where your problem is.
      The neat thing about enforced indentation is that such errors become immediately and glaringly obvious once you are used to them; and it doesn't take long to do that. I've had such a problem precisely once.. and that took absolutely no time to fix. Now, a missing or misplaced end-brace can be much harder to find.

  14. YADNAL by X · · Score: 1

    The GPL is a license which defines the terms and conditions of a contract under which you can use the copyrighted material. If you don't accept the terms of the license, and you use the IP covered by the license, then you need to be able to produce some other contract which gives defines the terms under which you get (or more likely get to use) the IP. This is no different from any of those shrink wrap licenses you get with commercial software. When you get commercial software, you aren't actually getting anything more than a license which allows you to do certain things with the code. To follow your analogy, they aren't giveing you the hamburger, just the right to smell the hamburger under certain restrictions. If the GPL can't be enforced, then at the VERY least all of those licenses that you have to accept to get freely available (but proprietary) code are invalid (this covers Java, tons of MS software, most of Stroud's CWS apps, etc.), let alone software sold for $.

    --
    sigs are a waste of space
    1. Re:YADNAL by X · · Score: 1

      Yes, the license is still the same. However, it's not a valid contract, and you need a contract to disclaim warranty.

      Following your logic, if I steal some software from someone, they can't disclaim warranty, because there was no contract, and therefore I can sue them for damages the software does.

      The GPL can be declined. Indeed, you are not accepting the GPL unless you use the source code or a binary derived from the source code. That is plenty to establish a contract.

      I agree the jurisdiction thing is problematic. I assume that FSF's lawyers figured it was the only way to do it. It's amazing that the hardest thing in the world to do legally is give something away without any liability.

      --
      sigs are a waste of space
    2. Re:YADNAL by X · · Score: 2

      You are confusing the license with the packaging. If I stuck the GPL license inside a shrink-wrap package of software (in which case I presume it would be indistinguishable from your typical commercial software license in terms of the reject/accept argument), the license is still the same.

      Your case about laws requiring that you have a chance to review the license are a good point, and are a good case for a more cautious approach towards free software distribution that ensures clear presentation of the license in advance of software use. The existing practice of having a LICENSE file and headers at the top of the source code, while pragmatic, is subject to the bizarre variations in contract law. Still, this is talking about the delivery mechanism as opposed to the license.

      Just for humor I thought I'd point out that if you really believe that in the real world (as opposed to the legal one) you can reject the terms on a shrink wrap license after reading it, you obviously haven't tried. Unless the license cost you thousands of dollars, it isn't worth the fight.

      I agree that the waiver issue is a problem. Contract or no, if you don't establish a jurisdiction for this kind of license fighting it in court is going to be increadibly complex.

      --
      sigs are a waste of space
    3. Re:YADNAL by Russ+Nelson · · Score: 2

      In a non-UCITA state, you are wrong. Existing law requires that you have a chance to review the license, and accept or reject it. Current software distribution technology does not give you this opportunity. Once you have unpacked the software, it's too late. They're still bound by the license. You now have title to a copy of the software, and the copyright terms (the GPL) does not apply to you.

      Those elements absent in the GPL are present in shrink-wrapped software. You are free to reject the terms presented to you and return the software to the store.

      In Virginia, a UCITA state, you are allowed to condition a license upon performance. So that once the software has been installed, you may claim that the user should have gone looking for a license, and if they failed to, it's their tough luck. However, UCITA also requires a warranty on all software, so that the GPL terms have no effect.

      In Maryland, also a UCITA state, there is a bill on the governor's desk which grants an exemption to open source software for which no license fee is charged. Once that law is signed and goes into effect, the GPL terms will be binding upon users (as opposed to distributors who are bound when they copy the software).

      IANAL, but I had dinner with two lawyers (and if you're really well-informed, you can venture a good guess as to who they are) on Wednesday night. If you think hackers use impenetrable jargon, just listen to a pair of lawyers in the middle of a legal hacking session! It's enough to make your head spin.

      BTW, it's not the whole GPL that can't be enforced. It's only the waiver of warranty.

      Also BTW, try convincing Eben Moglen and/or RMS that the GPL is actually a contract. It isn't. They didn't intend it to be, and it wasn't written in the form of a contract.
      -russ

      --
      Don't piss off The Angry Economist
    4. Re:YADNAL by Russ+Nelson · · Score: 2

      Yes, the license is still the same. However, it's not a valid contract, and you need a contract to disclaim warranty.

      Unless you're GM or GE, you're not going to be able to change the terms of a shrink-wrap license. However, any store that doesn't take back shrink-wrapped software is going to face great pressure from the industry. The validity of the shrink-wrap license is predicated on your ability to refuse it. If, in fact, you have no right, then the license is not a contract, and you're not bound by it.

      And that's another thing: jurisdiction. The FSF claims that any license which dictates jurisdiction is not compatible with the GPL, because doing so imposes extra restrictions on the GPL'ed software.
      -russ

      --
      Don't piss off The Angry Economist
  15. To all you whiners by Christopher+Craig · · Score: 1

    As any serious Python programmer knows, Python already supports block delimiting. For instance the statement:

    if (a==b):
    #begin
    x=2;
    y=3;
    #end

    is correct, as is

    if (a==b):
    #{
    x=2;
    y=3;
    #}
    print x;

    This is all explained in the Python documentation for those of you who have not seen this before.

    1. Re:To all you whiners by irix · · Score: 2

      Yeah, and C supports indentation delimiting too:

      if(a==b)
      {
      /* ignore previous line please */
      a = c;

      ...

      --

      Do you even know anything about perl? -- AC Replying to Tom Christiansen post.
    2. Re:To all you whiners by zephc · · Score: 1

      no semicolons to end lines in python =]

      -----------
      MOVE 'SIG'.

      --
      "I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
  16. Re:Licence issues by Jason+Earl · · Score: 2

    The issues with the license are very minor, as you say. Why does the FSF obsess over it so much?

    The FSF obsesses over these things because that is the way that the law works. Writing legal documents is a lot like writing complex C memory management code. One off by one error and the entire application segfaults. It's the same thing with the law. One minor detail could cost the case, and when you are talking about something as important to the FSF as the continued "freeness" of the software they have developed you can see why this would make them a little paranoid. Because of this the FSF has worked very hard to make sure that everything that they do is as legal and aboveboard as possible.

    That's why they require pen and ink signatures on a legal document assigning them as copyright holder before you can work on GNU software. They know that only the legal copyright holder can press charges in the US, and they want to be sure that they have the power to enforce their license.

    Many of the other open source projects (like Python, for instance) have been much more haphazard about the licensing of their product. Guido, for example, failed to make sure before continuing work on Python that it would continue under the same X style license as it always had. His employer got nervous, and their lawyers came up with a license that isn't GPL compatible (at least according to the FSF lawyers).

    It is convenient to blame the FSF lawyers, but they didn't change the original Python license. They just pointed out that they don't feel that the new license is GPL compatible. If these details weren't important, then perhaps the people who changed the original license should change it back. The fact of the matter is that the details probably are important enough that neither side is going to bend. The FSF doesn't want to threaten the GPL, and the lawyers at CNRI and Digital Creations don't want to be liable for problems someone might have with Python.

    The FSF should be commended for taking care of these details before it starts developing software. If Guido would have done the same, there wouldn't be any problem.

  17. Python is fun! by Bander · · Score: 1

    First off, I'll confess to being a language junkie. I like to learn programming languages, and I enjoy playing with them. Secondly, my bread and butter languages are C and Perl, which I like and dislike about equally.

    So I've played with Python. Written a few small programs (some for personal use, a couple at work)... What none of these so-called Python advocates are mentioning is that programming in Python is fun.

    I wish I could quantify it better, but I've actually found myself chuckling as a Python program came together.

    Bander

    p.s. Some of you people who think the block syntax in Python is too weird should take a look at Scheme or FORTH... Some of us used to program with a line-number oriented language without any real block structure at all. Back in those ancient days, we called it BASIC and liked it. :^)


    --
  18. Argh. We need license compatibility. by Zooko · · Score: 5

    Guido:

    Please take a deep breath and go in for one last go-around with the FSF lawyers. Pretty please?

    As far as I could tell, the remaining issues are just "legalese exhaustion" on your part rather than actual conflicting goals. Maybe you could deputize a legalese wrangler to finish negotiations for you, or you could take a month-long break in which you never think a single thought about licenses, and then you go back and finish the negotiations.

    This is really important to me, although I am not a GPL fanatic, because if it remains the case that the licenses are (allegedly) incompatible, then there will be lots and lots of people who will refuse to combine GPL code with Python, and that would really suck.

    For example, I want to package up my open source application Python, Mojo Nation to be included in Debian. This would be a way to reach hundreds of thousands (? maybe fewer. Anyone know how many Debian users there are out there?) of highly clueful users and hackers who would otherwise never install Mojo Nation. The Mojo Nation code source code itself is under the LGPL, and some of the open source libraries that it uses are other under free licenses. Would this cause a legal conflict that would force the debian people to keep it off of their servers? I don't know (since it is LGPL instead of GPL), but I would feel so much better if the Python license were officially GPL compatible.

    Regards,

    Zooko

  19. Re:"State" of Virginia? by softweyr · · Score: 1
    "VA can call itself whatever it wants to, but under the US Constitution it's a state".

    Yes, and if they were trying to get the license interpreted under US law, that would probably be effective. They're not, it won't work, and you're a moron for not noticing that. Try not to dabble in legal work, you obviously don't have the powers of concentration needed.

  20. Re:Argh. We need license compatibility. by AMK · · Score: 4

    Let me point out that the GPL-compatibility doesn't affect software written in Python, only attempts to embed the Python interpreter inside a GPLed program. For example, there's GPLed software written in Java, even though the most commonly used JVM isn't GPLed. Python's license should be irrelevant to whatever license your Python application uses.

    Also, note that the Apache license isn't GPL-compatible, yet that doesn't prevent Debian including Apache. I view this debate as a tempest in a teapot; it may affect people who want to do things like embed Python inside the GIMP, say, but most Python users don't have to care.

  21. I agree by nrrd · · Score: 1

    Python is a great language with a great user community! Please, do yourself a favor, download Python and gve it a try. I let the whitespace issue keep me from using Python for using Python, but my curiosity got me to try it. I'm glad I did.

    --
    "Eye halve a spelling chequer, It came with my pea sea, It plainly marques four my revue, Miss steaks eye kin knot sea"
  22. Python is why I chose not to GPL my DNS server by Kiwi · · Score: 2

    Anyway, I removed the acceptance ceremony from the 2.1 license, in the hope that this would satisfy the FSF. Unfortunately, the FSF's response to the 2.1 license (see above) seems to suggest that they have changed their position once again, and are now requesting other changes in the license. I'm very, very tired of this, so on to the next question!

    The main reason I chose to to GPL my latest open source project--the MaraDNS server--was because I knew that there were some incompatibilities between the GPL license and the Python license. As long as the GPL may make it impossible to make a python module out of my code, I am not going to GPL it.

    Instead, I made MaraDNS public domain. BTW, I use Python-style syntax for the mararc file MaraDNS uses.

    BTW, isn't it against the license for Python to have a gdbm module, since gdbm is GPL and not LGPL? And, is it not inappropriate to have Python KDE bindings or use Python in KDE programs?

    - Sam

    --

    The secret to enjoying Slashdot is to realize that it should not be taken too seriously.

    1. Re:Python is why I chose not to GPL my DNS server by MAXOMENOS · · Score: 2

      That depends on which version of the Python language you use. Python 1.5.2 is fully GPL-compatible; Python 2.1 isn't. If you're worried about GPL compatibility, stick with 1.5.2.

      ObJectBridge (GPL'd Java ODMG) needs volunteers.

    2. Re:Python is why I chose not to GPL my DNS server by Shadowlore · · Score: 1

      Uhh you do realize that the license on Python is for PYTHON and not for apps coded in Python, right?

      --
      My Suburban burns less gasoline than your Prius.
  23. Re:Answer the question, dammit! by Zagadka · · Score: 1

    I cut and pasted some tutorial examples from the web a while back, and it wouldn't work until I made the blasted things tabs rather than spaces.

    It doesn't matter if you use tabs or whitespaces, provided you use them consistantly. I never use tabs in my Python code, so so much for your theory about it requring tabs...

  24. Re:Argh. We need license compatibility. by DLPierson · · Score: 3
    The main problem is that Guido can't really do anything about this. It's the CNRI lawyers talking to the FSF lawyers. He doesn't work for either. Neither is depending on him for anything important to them.

    I think he's doing a remarkable job of remaining cool in the middle of a legal firefight he has almost no influence over.

  25. Re:Easily overlooked - not. by Tripp+Lilley · · Score: 1

    It's perfectly valid. It may even be perfectly correct, but the indentation suggests an intent that the code does support.

    Yes, it is "suspicious", inasmuch as one would probably never write this code all at once. However, programmers, practicing the First Virtue (laziness), very often use:

    if (x > 10) x = 10;

    or the original, indented example, leaving out the braces in either case. When another coder comes along and realizes that the code also needs to set y=0 when x > 10, there is a "not insignificant" chance that they will forget to wrap the whole thing in braces.

    The reason for this is simple: tunnel vision. It's the same thing that causes me to make a perfect cut on my tablesaw, then perfectly align the perfectly-cut piece with the wrong side of the other perfectly-cut piece, and glue them together.

    In this particular regard, then, Python eliminates the ambiguity and resolves intention with indentation. If it looks like it belongs to a block, then it does.

    Like so many Python converts, I was initially skeptical of this entire process. My license plate used to read "USE PERL"! However, since writing "real" code in Python, and extending someone else's "very large" project in C, I confess that I now realize using indentation for blocking is the "right" answer, as long as we're presuming a text-based language :)

  26. Re:Indentation syntax has its problems too by hmckee · · Score: 1

    Of course you don't know what the code is supposed to do, the code is just an example. That's the problem using contrived code as an example; they provide no context to explain what the code is supposed to do.

    If I were working on a project and saw some stray code with cryptic variables such as x and y being assigned to for no apparent reason, I would question whoever wrote the code.

    Code from the above example should REQUIRE some comments explaining what x and y are and why they are being changed.

  27. Re:Hrmph! by Shadowlore · · Score: 1

    This applies equally well to those who refuse to use python because it uses indentation, would you not agree?

    --
    My Suburban burns less gasoline than your Prius.
  28. Re:"State" of Virginia? by toriver · · Score: 1

    Well, they're not on the list, so they may have some other strange definition instead of the common meaning.

  29. Too bad, he "skipped" the comparison with Ruby. by renoX · · Score: 1

    As I'm a language freak, I like comparison between languages.

    I said COMPARISON not FLAME WARS.

    I understand that he must be very busy, but I think that he should take the time to look at Ruby because IMHO it competes in the "same space" (a clean scripting language).

    Know thy competitor, even if it is only to steal its bests idea :-).

    1. Re:Too bad, he "skipped" the comparison with Ruby. by Nohea · · Score: 1

      Maybe he is sensitive about acknowleging Ruby as a real alternative.

      It's clear Ruby is playing in the same space as Perl and Python. And Ruby kinda sits in between the two, but seems more Perl-like.

      Diclaimer: i'm a Perl programmer (and Java) mostly.

      Python has seemed to gain a lot of developer mindshare from those who are turned off by Perl's warts. However, Python brings its own issues, many of which are described in other threads (indents,licensing)

      So Ruby is almost like Perl without the warts, as far as oo-inclined programmers are concerned. Ruby's main issue is installed base and developer support.

      Developer support (mindshare) is crucial to the success of any software technology. Perl succeeded partly through merits, partly through the historical lack of good alternatives. Python is fighting uphill, and i'm sure guido doesn't want to fight on two fronts.

    2. Re:Too bad, he "skipped" the comparison with Ruby. by MeowMeow+Jones · · Score: 2
      Although he did say that he was considering abolishing the differnce between types and classes, which seems to be the biggest gripe Ruby people have against the 'oo purity' of python.

      Trolls throughout history:

      --

      Trolls throughout history:
      Jonathan Swift

  30. Re:My Favorite Python Sketch .... by Requiem · · Score: 1

    Nah. Nothing beats the cannibalism sketches. Those are downright offensive. :)

  31. Re:the GPL is not a contract by sethg · · Score: 2
    The GPL is a "contract" in the informal sense, where "contract" is often used as a fancy or solemn way to say "promise". However, the law has a more stringent definition of "contract". (Or, if you're more cynical, the law provides all sorts of ways for you to make an agreement that looks like a contract but can't actually be enforced in court.)

    If someone violates the GPL, they can still be sued -- but they would be sued for copyright infringement, not contract violation.
    --

    --
    send all spam to theotherwhitemeat@ropine.com
  32. the GPL is not a contract by sethg · · Score: 3
    License == Contract
    Not necessarily. A contract is an agreement where two parties make promises to provide benefits to one another: "If you give me $5, I will give you a hamburger."

    By contrast, the GPL is a unilateral grant of permission. I don't have to give the FSF anything in exchange for my freedom to redistribute GNU Emacs -- I just have it.

    If I modify Emacs and redistribute the modified version, the GPL places restrictions on how I can redistribute it. But even here, the restrictions are not in the form of a contract. The FSF has given me unilateral permission to publish any Emacs-derivative with a GPL-compatible license. It's like saying "I will give you this hamburger on the condition that you don't put cheese on it."

    I don't have to give anything specifically to the FSF in exchange for the right to publish my Emacs derivative. For example, I could give copies to my 10 closest friends (none of whom work for the FSF), and they could all use the program for a month, decide they didn't care for it, and delete it. That would count as "publication" under copyright law, but it's hard to see how, in this circumstance, I am benefiting the FSF by adhering to the GPL. (Well, the FSF gets a benefit in the warm fuzzy ideological sense by having more people use GPLed software, even when those people have no connection to the FSF. But it's not like I'm giving them money.)

    And if a 12-year-old girl produces a modified version of Emacs, and publishes it under terms that violate the GPL, the FSF could sue to prevent her from distributing it -- not because she violated a contract with the FSF (since she can't legally be bound by a contract), but because she is distributing the FSF's copyrighted material without permission.

    (Disclaimer: IANAL, and there are enough odd nooks and crannies in contract law that I could imagine someone arguing the other way.)
    --

    --
    send all spam to theotherwhitemeat@ropine.com
    1. Re:the GPL is not a contract by nrftwicked · · Score: 1

      Contract \Con"tract\, n. [L. contractus, fr. contrahere: cf. F. contrat, formerly also contract.] 1. (Law) The agreement of two or more persons, upon a sufficient consideration or cause...

      consideration means benefit - so yes, mutual benefit is required for a contract to exist. IANAL, but IWasAALStudent.

      --


      If nobody ever re-invented the wheel, we'd all be pushing around flintstones cars, wouldn't we?
    2. Re:the GPL is not a contract by ryants · · Score: 2
      "I will give you this hamburger on the condition that you don't put cheese on it."

      That sounds like a contract to me.

      A contract doesn't necessarily need to involve mutual benefit, or an exchange of anything. A contract is simply an agreement undertaken by two or more parties. The GPL is exactly that: an agreement:

      Contract \Con"tract\, n. [L. contractus, fr. contrahere: cf. F. contrat, formerly also contract.] 1. (Law) The agreement of two or more persons, upon a sufficient consideration or cause, to do, or to abstain from doing, some act; an agreement in which a party undertakes to do, or not to do, a particular thing; a formal bargain; a compact; an interchange of legal rights. --Wharton.

      Ryan T. Sammartino

      --

      Ryan T. Sammartino
      "Ancora imparo"

    3. Re:the GPL is not a contract by ryants · · Score: 2
      However, the law has a more stringent definition of "contract".

      Yeah... that's why the definition I posted has (Law) in front of it, which means "not the informal definition, but rather the jargon of a certain profession".

      Ryan T. Sammartino

      --

      Ryan T. Sammartino
      "Ancora imparo"

    4. Re:the GPL is not a contract by crealf · · Score: 1
      And if a 12-year-old girl produces a modified version of Emacs, and publishes it under terms that violate the GPL, the FSF could sue to prevent her from distributing it -- not because she violated a contract with the FSF (since she can't legally be bound by a contract), but because she is distributing the FSF's copyrighted material without permission.

      I thought that Russ Nelson argument was shaky, but anyway the appropriate scenario is the following: the 12-year-old is injuried as a result of using the same GPL software, and her parents sue the FSF ? The only GPL recourse is to say that it is written in the license that there is no warranty, and that she was contractually bound to it when using the software. There is no copyright violation.

  33. A GPL compatible interpretation by Adam+J.+Richter · · Score: 1

    This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding conflict of law provisions.

    I believe the term "this license agreement" refers only to the CNRI license, not to all other agreements that might be offered with respect to the copyrights of other works that Python comprises. For example, the BeOpen material is covered by a California choice-of-law provision. As I read it, the CNRI and BeOpen conditions do not say that the GPL must be interpreted under Virginia or California law, nor do they (nor could they) require that litigation be conducted in California or Virginia.

    Also, since CNRI knowingly published their works for years without a copyright notice and knew that these works were being treated as though they were covered by the CWI copying conditions, I think CNRI's copyrights are probably unenforceable because of the "sleeping on your rights" doctine.

    On the other hand, I am not a lawyer, so don't take this as legal advice. In fact I'm not even taking my advice: just to be careful, we use a much older version of Python in the Yggdrasil build tree. (Yeah, I know its been years since a release, but there are still nightly builds and now rsync'ing. You could arguably call me crazy for it.).

  34. Re:Easily overlooked - not. by Shadowlion · · Score: 1

    Why not have the parser spit out a 'suspicious construct' warning instead?

    Because the parser would wind up spitting out an error for every multi-line block you had. In a throwaway example, such as this, it works out okay. In an app with thousands, or tens of thousands of lines of code, I shudder to think of the number of messages the parser would display.


    --

  35. Re:Easily overlooked - not. by Shadowlion · · Score: 1

    Oh, sorry, my bad.

    I thought he meant, why not have the parser spit our an error message in Python, not C. Yeah, if we're talking about C, you're right - it would only pop up in a few rare cases.

    However, I can see some other problems with that. In certain C statements (switch/case, I'm looking in your direction!), it _is_ legal to have multiple statements on the next line without being enclosed by a curly brace. The compiler/parser would have to be bright enough to recognize that switch/case is a special case (which doesn't require much intelligence, I guess).

    --

  36. Re:Indentation syntax has its problems too by ChadN · · Score: 1
    That is my point. The language DOES "incorporate" this feature. The blocking comments are perfectly valid python code, and you can run the tool automatically upon startup of python, if you wish (with .pythonrc or other means). Then you can program with bad blocking all you want.

    Honestly, if you can't deal with simple problems like these, then I wouldn't be comfortable charging you with more complex tasks.

    I like the clean simple syntax of Python; It allows me to concentrate on more important issues, like design, in an elegant way. To each his own.

    --
    "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
  37. Re:Indentation syntax has its problems too by ChadN · · Score: 2
    In whitespace hostile environments, a tool such as pindent.py can be used. It adds commented block delimiters that preserve block structure when whitespace is messed with, and then converts back into executable Python source. The Emacs mode (and CVS, etc.) can be made to automatically apply these conversions, if desired.

    So you see, in practice the use of indentation to delimit blocks is not impractical at all. It simply comes down to a matter of tastes, training, and preference.

    I write a lot of C++ and Python code. I like both; the static vs. dynamic typing issues are HUGELY more relevant in determining which is better for a certain task, than block delimeters.

    --
    "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
  38. Python Block Delimited Notation Parsing Explained by Phill+Hugo · · Score: 1
    http://www.python.org/doc/Humor.html#parsing

    http://www.python.org/doc/Humor.html#parsing

    The over cautious "junk character lameness filter" wouldn't let me quote it, but do look at it, its funny.

  39. Re:That's where code formatters come into play... by SuperKendall · · Score: 1

    I've worked on many large projects. There are a couple of scenarios here:

    1) A lot of people are activley working on the project. In that case I might very well not check in my modified file, just my changes (merging them back with an interactive diff tool). Or, I'll change one small section of the code to be formatted well and over time the whole thing will be rearranged.

    2) I'm reviving an essentially dead project. In this case, if the formatting is especially bad, I'll just reformat some of the worst case and check it in anyway... damn the diffs, at least it's readable.

    What are you worried about beyond the diffs? I tend not to worry about space for SCM repositories as individual modules are not large enough that even a whole file change is going to cause a lot of grief.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  40. Re:That's where code formatters come into play... by SuperKendall · · Score: 1

    You have a very good point about a mode fashioned for a lnaguge in Emacs not letting you indent things incorrectly... that was a bad example.

    However, my primary point was that I prefer systems that let me format things the way I wish to make them readable for me.

    I can think of other code formatting tools (like something that would turn tabs into 8 spaces) that might case problems if you had some lines with tabs and some with spaces (whcih I see all the time when a lot of people work on a file with different tools). To me, it just seems like a delicate system.

    I've worked a little with python and I like the language, but the whitespace formatting still feels quite alien to me.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  41. I'll answer that... by SuperKendall · · Score: 1

    I'll provide at least one answer to what else you might be worried about - conflicts during checkin. But, like I said I usually only check in small sections (if anything) when working with files so it's not much of a problem.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  42. That's where code formatters come into play... by SuperKendall · · Score: 2

    When I come across some code that's a bit hard to read because of formatting issues, I just load it into Emacs and run indent-region on the whole thing - now all the code is formatted just the way I most used to reading it.

    Under a whitespace formatting system, I would have just destroyed the whole file instead of making it readable. I think it's better to let a programmer format code the way they can best read it.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
    1. Re:That's where code formatters come into play... by Palou · · Score: 1

      That's just nonsense. For several reasons. Whitespace formatting *is* indentation, so the indent-region command wouldn't change a thing to the code. In any case, indent-region and other EMACS major programming mode commands totally depend on the specific active programming mode. If you're using the right mode (say the excellent Python mode) there won't be any problems with that.

  43. Licence issues by The+Toad · · Score: 1

    I don't understand what Guido is whining about. Eben's response seemed polite, rational, and reasonable.

    The issues with the license are very minor and I'd like to know why Guido has a problem with the FSF's recommendations.

    (sorry about the repost - why does slashdot keep randomly forgetting who I am?)

    1. Re:Licence issues by The+Toad · · Score: 1

      I definitely think he's whining in this case. To call Eben's message "legalese" is whining. I'm just a stupid sysadmin, not a laywer, and it made perfect sense to me - no legal dictionary required.

      Of course, I know nothing about the specifics of Guido's past interactions with FSF lawyers and I'm willing to believe that previous interactions may have been difficult, but this instance does nothing to support that (and he implies that it does support it, so I tend to doubt the credibility of the claim).

      To you, Russ, and anyone else complaining about how annoying the GPL/FSF/"Free Software" stuff can be:

      I think the FSF has a very difficult task. They want people who create "free" software and release it under the GPL to have the assurance that someone won't take their work and make it "non-free" using a legal system that seems designed around the opposite concept (keeping "non-free" property from becoming "free"). The FSF needs to be very careful in order for the GPL to have a chance in hell of being enforceable. If they're picking nits, it's because they *have* to.

      It's not up the FSF to bend the GPL to meet Guido and his former employer's needs. If they want the Python license to be GPL-compatible, it's up to them, as the creators of the Python licence, to make it compatible.

      Of course, the only true arbitrator of this issue would be the courts, but I hope people are smart enough to avoid that and simply allow the FSF to be the authority on what is and isn't GPL compatible.

      And, Russ, I don't really understand your comment about the "state law" issue. What I understood Eben to say is that they can't say that it's GPL-compatible to add restrictions like that to a licence because that precedent would potentially allow others to add their own restrictions to GPL'd software. What's wrong with that concept?

    2. Re:Licence issues by Russ+Nelson · · Score: 2

      I wonder if Eben has read the GPL. He says "Then anyone can receive a GPL'd program, modify it, and rerelease under a GPL with an Unfeedonian-law-applies clause." How could they do that? You can't modify the GPL. In fact, leaving the jurisdiction unstated allows someone to interpret the GPL under Unfreedonian law. If the GPL specified Massachussetts law, then it would be less uncertain.

      But sometimes I wonder if the GPL wasn't devised to enhance uncertainty.
      -russ

      --
      Don't piss off The Angry Economist
    3. Re:Licence issues by aburnsio.com · · Score: 1

      Why does the FSF obsess over license issues? One word: RMS. I dare you to meet him in person and say something even remotely non-GPL compatible and see what happens. It's not pretty.

    4. Re:Licence issues by aburnsio.com · · Score: 1

      Public Domain, not BSD, is freedom. Of course, it depends on what you mean by freedom; BSD is the freedom to get screwed by some company ripping off your work and making it proprietary.

    5. Re:Licence issues by Tech187 · · Score: 1

      Is it because the FSF keeps asking for different things?

      The issues with the license are very minor, as you say. Why does the FSF obsess over it so much?

    6. Re:Licence issues by warmiak · · Score: 1

      He is not whining about anything.
      I often feel the same "tiredness" of dealing with supposedly free GPL.
      For a "free" license it sure makes you go through many hoops, checking and double checking that everything fits well into FSF mindset and their vision of what free software is about.

      --
      The only way liberals win national elections is by pretending they're not liberals.
  44. Guido Van Rossum is Dutch not Italian (nt) by Vamphyri · · Score: 1

    nt

  45. Re:"State" of Virginia? by pthisis · · Score: 1
    Well, Virginia is a Commonwealth, as any Virginian knows, so that might be part of the problem!

    VA can call itself whatever it wants to, but under the US Constitution it's a state--and the Constitution is the supreme law of the land, accepted by VA over 250 years ago.

    And the link you gave was to www.STATE.va.us...

    Sumner

    --
    rage, rage against the dying of the light
  46. My Favorite Python Sketch .... by opencode · · Score: 1

    is about the trained idiot. with "many aparati available in his backyard designed to keep him [John Cleese] silly" ....

    Oh, and of course, the lumberjack song with footnote: "Dear sir, I find the preceeding bit about lumberjacks dressing in women's clothing both highly offensive dispicable. For I have several close friends who are lumberjacks, and only a few of them are actually transvestites."

    --
    "He who questions training trains himself at asking questions." - The Sphinx, Mystery Men (1999)
    1. Re:My Favorite Python Sketch .... by F452 · · Score: 1

      Of the many good scenes from the Holy Grail, this is one of my favorites:

      ARTHUR
      Old woman!
      DENNIS
      Man!
      ARTHUR
      Man. Sorry. What knight lives in that castle
      over there?
      DENNIS
      I'm thirty-seven.
      ARTHUR
      I-- what?
      DENNIS
      I'm thirty-seven. I'm not old.
      ARTHUR
      Well, I can't just call you 'Man'.
      DENNIS
      Well, you could say 'Dennis'.
      ARTHUR
      Well, I didn't know you were called 'Dennis'.
      DENNIS
      Well, you didn't bother to find out, did you?
      ARTHUR
      I did say 'sorry' about the 'old woman',
      but from the behind you looked--
      DENNIS
      What I object to is that you automatically treat
      me like an inferior!
      ARTHUR
      Well, I am King!
      DENNIS
      Oh, King, eh, very nice. And how d'you get that, eh?
      By exploiting the workers! By 'anging on to outdated
      imperialist dogma which perpetuates the economic and
      social differences in our society. If there's ever
      going to be any progress with the--

      and so on...

  47. Re:Hrmph! by Richard+Jones · · Score: 1

    Here here!

  48. Sick of Perl/perl/PERL bigots.. by musicmaker · · Score: 2

    I have written applications, not scripts, full scale major applications in both python and in perl (amongst other languages). And I have found python to be an absolutely fantastic languauge, whilst my troubles with perl still continue. I'm sorry, but any language that you have to call with special flags to get it to give you warnings of any kind is kind of lame in my book. Also namespace is such a problem, major applications can easily become buggy because of a small namespace issues. This just doesn't happen in real languages that have sane scoping.

    Perl is good at what it was originaly designed for. Practical Extraction and Report Language, but don't bother if you wan't a multithreaded TCP/IP server. (26 lines of python - including spaces). And to be honest, python is just as easy as perl at that to.

    If you really beleive you have an 'investment' in perl then you need to get a life and become a real programmer. The only difference between most 3rd generation languages is syntax, and within a couple of weeks, and with a good reference (i.e. www.python.org) behind you you can pretty much do anything.

    --
    Everyone is living in a personal delusion, just some are more delusional than others.
    1. Re:Sick of Perl/perl/PERL bigots.. by Camel+Pilot · · Score: 1

      Care to be a little more specific then saying "namespace is such a problem" sigh.

      And then there is but any language that you have to call with special flags to get it to give you warnings of any kind is kind of lame in my book Perl gives does not require setting special flags for warning messages. It does allow you suppress warnings with the cryptic pragma

      no warnings;

      Why don't you post your 27 line multithreaded TCP/IP server. I bet it can be done with less hassle in Perl and would be faster to boot.

      Oh but wait, then you pulled out the "real programmers" arguement. Now I am convinced.

    2. Re:Sick of Perl/perl/PERL bigots.. by bXTr · · Score: 1

      If you really beleive you have an 'investment' in perl then you need to get a life and become a real programmer.

      You obviously have never had to rewrite a whole project from one language to another, right? BTW, *you* might want to invest in a dictionary or a good spellchecker. "'i' before 'e', except after 'c'".


      NEVER use a spineless operating system.
      --
      It's a very dark ride.
    3. Re:Sick of Perl/perl/PERL bigots.. by gupta · · Score: 1

      "TCP/IP Server"? What the hack is that ?

  49. Re:GPL is fundamentally broken, sorry. by Another+MacHack · · Score: 1

    Then so is the BSD license, which makes the non-advertising BSD license completely broken, since it doesn't accomplish the only thing it sets out to do.

  50. Re:Easily overlooked - not. by Russ+Nelson · · Score: 2

    There's an < missing between x and 10. That's what your C parser is picking up on.
    -russ

    --
    Don't piss off The Angry Economist
  51. No. There is no opportunity for acceptance or rej by Russ+Nelson · · Score: 2

    No. There is no opportunity for acceptance or rejection. A contract *must* be accepted by both parties. All that's needed is to put the software inside a tarball, then to put it inside another tarball that contains "README" which offers the use of the software conditioned upon acceptance of the license. If you unpack the inner tarball, you have accepted the license. If you don't accept the license, you don't unpack the tarball. You may, if you wish, have a software agent which accepts the license for you. We can write a standard for the form of the license, so that in practice, you run "license" instead of "tar xfz". And you have pre-configured license with the licenses you will accept automatically.

    RMS doesn't like this idea because the contract could specify terms of use, and he is unalterably opposed to any kind of use license (and I don't blame him). The solution is to oppose bad contracts, not to hide your head in the sand and pretend that users (not distributors) have disclaimed warranty.

    I don't want to warrant use. Legally, right now, most of us do. This should be fixed.
    -russ

    --
    Don't piss off The Angry Economist
  52. Re:Huh? by Russ+Nelson · · Score: 2

    Re-read it. That's not what he's saying. He's saying that privity -- and contract law -- is not necessary, because copyright law governs copying.

    Note how the GPL says "This software is yours to use." That means that no conditions apply. It also means that the disclaimer of warranty (which requires agreement to a contract) does not apply to anyone who merely uses the software and refrains from copying it.
    -russ

    --
    Don't piss off The Angry Economist
  53. GPL is fundamentally broken, sorry. by Russ+Nelson · · Score: 4

    The GPL includes a warranty disclaimer. A warranty disclaimer is part of contract law. But the GPL is explicitly not a contract, but is instead a set of copyright permissions. So the warranty disclaimer doesn't apply to anyone who doesn't copy code.

    The GPL warranty disclaimer can't work.
    -russ

    --
    Don't piss off The Angry Economist
    1. Re:GPL is fundamentally broken, sorry. by mghiggins · · Score: 1

      > But you don't have to accept GPL to run the program, so the warranty disclaimer does not apply.

      But you *do* have to agree to it if you want to redistribute the code or change it.

      --
      All opinions expressed herein are not my own; I haven't had free will since last year when aliens ate my brain.
    2. Re:GPL is fundamentally broken, sorry. by martinflack · · Score: 1

      So the warranty disclaimer doesn't apply to anyone who doesn't copy code.

      Except of course the original copy you performed to get the software onto your system in the first place. You then bind your organization.

      From a purist point of view, you may be right though. But two things spring to mind: (a) merchantability and fitness for a particular purpose are implied warranties enforced as public policy to protect buyers and generally entitle you to a refund and return if they are failed - I don't think they go much beyond that, so in the case where the software is free there isn't too much to refund. (b) Maybe the GPL is a new animal waiting to be tested by the courts. It's like a writ from the old days - a copyright holder's writ of authorization exempting everyone from infringing federal copyright law. Maybe the courts will extend warranty disclaimers to such things because of the success of the GPL? Not something to bank on, but worth pondering...

      I'm not a lawyer.

    3. Re:GPL is fundamentally broken, sorry. by ryants · · Score: 2
      But the GPL is explicitly not a contract, but is instead a set of copyright permissions.
      Er... the GPL is a License (the "L" in GPL)...

      License == Contract ... it is the terms under which you can use/copy/modify GPLed software.

      Ryan T. Sammartino

      --

      Ryan T. Sammartino
      "Ancora imparo"

  54. Re:Problem with Python... by segmond · · Score: 2

    Your argument is just like saying, "the biggest problem that I face with java, is the portability of the code... it's extrememely difficult tow rite a "stand-alone" application that be distributed..." No CPU executes a java class file, for anyone to run your java program you need to have java installed, or give the the source. The same is true with python. Anyway, since most people have java VMs installed, another simpler way to accomplish this is to use Jython. Write in python, compile into javabyte code and just distribute the class files.

    --
    ------ Curiosity killed the cat. {satisfaction brought it back | it didn't die ignorant | lack of it is killing mankind
  55. Re:Indentation syntax has its problems too by nevets · · Score: 1

    syntex. " [sic] At least I got it right in the subject :-)

    Actually, you missed my point.

    If for some reason I hit the tab on the "y" part, I would not know it was a mistake until I really analyze the code. It is not as easy to make a mistake with adding the "}" in the wrong place. Yes it can be done, but not as easily. It is easier to make indentation mistakes in Python, and that will be harder to spot it, especially if you have long code segments and get messed up in the nesting structure. Maybe you could add begin and end comment statements to help in this, but that is an overhead that few, if any, programmers will do.

    My preferred scripting language is Perl, and a coworker of mine prefers Python. We both make fun of each other and have debates on the issue all the time. But this one point, he actually agrees with me.

    There are those that like the Python way, and there are those that like the Perl way. This is a Holy war and will never end. So, I too believe that Python will be around in 20 years (although it may change) but I also believe that Perl will be around in 20 years. This is the case because it is a Holy war, and as we can learn from the Mid East, they can last a long time.

    Steven Rostedt

    --
    Steven Rostedt
    -- Nevermind
  56. Indentation syntax has its problems too by nevets · · Score: 2

    What's wrong with the legibility answer? I think that's an *excellent* reason! Don't care if your code is legible?

    In other words: "NO, I don't have another answer".

    Sorry, but I also don't care for the indentation for the exact reason that he gives.

    if (x == 4)
    x = 10;
    y = 6;

    Now how did I know that the writers intent was

    if (x == 4) { x = 10; }
    y = 6;

    or

    if (x == 4) {
    x = 10; y = 6;
    }

    the if without braces should also be avoided in C but I do fall for that too.

    Now if you use the braces, you know what the programmers intent was. But with Python, you don't. It could have been an indentation mistake, and that is harder to debug.

    So if they ment
    if (x == 4) { x = 10;}
    y = 6;
    How will you know with just an indentation syntex.

    I used Python for about a month, and gave up and went back to Perl for scripting. This is probably because of my long C experience.

    I believe in the More than one way of doing it. That's also probably why I hate MS Windows!

    Steven Rostedt

    --
    Steven Rostedt
    -- Nevermind
    1. Re:Indentation syntax has its problems too by Devil's+Avocado · · Score: 1

      Wow. Guido's handing you the keys to the Batmobile and you're upset because you want it in yellow.

      -DA

    2. Re:Indentation syntax has its problems too by gargle · · Score: 2

      Why doesn't someone just go ahead and write a version of python that uses braces instead of indentations? All it would take would be a simple text filter to convert braces into indentations (and vice versa).

    3. Re:Indentation syntax has its problems too by wrygrin · · Score: 3

      I may be misunderstanding you, but it looks like you're missing the point.

      In a language like C, braces express grouping for the computer, and people arrange their code with indentation to make the grouping obvious to themselves (and other people). The problem with this is that the two are not coupled - the braces and the indentation can conflict, *misleading* people about how the compiler is interpreting the program. The cited example is exactly a case in point:

      > if (x == 4)
      > x = 10;
      > y = 6;
      >
      > Now how did I know that the writers intent was
      >
      > if (x == 4) { x = 10; }
      > y = 6;
      >
      > or
      >
      > if (x == 4) {
      > x = 10; y = 6;
      > }

      As C code, it means one thing according to the whitespace and another thing according to the braces - so the programmers intent is undecidable from the context. Even the programmer themselves, rereading code, may be unable to reconstruct the reasoning. If the example is python code, there is no room for doubt. This is a good thing!

      Most python programmers i know who came to python with substantial experience had a moment of doubt about the whitespace structuring, and then (sooner or later) an epiphany that not only _can_ it work, it works well. Very well. It's no small bonus that it reduces clutter/visual noise, besides.

      --
      everything leaks
    4. Re:Indentation syntax has its problems too by swamp+boy · · Score: 1

      While I'm one of the "I wish it had explicit delimiters" camp, I settled on the following convention involving comments that seems to work for me.

      if x == 10:
      # end if

      while not done:
      # end while

      for x in y:
      # end for

      It's still not quite as getting a quick visual alignment of curly braces (I put my open brace aligned with my close brace), after a little practice it's easy to discern blocks.

      YMMV!

    5. Re:Indentation syntax has its problems too by mobiGeek · · Score: 1
      if (x == 4)
      x = 10;
      y = 6;

      Now how did I know that the writers intent was

      if (x == 4) {
      x = 10; }
      y = 6;

      ...

      Sorry, but you are comparing apples to corn bran here.

      The problem you state above is "a C programmer interpreting Python code". The similar argument in C would be:


      if (x == 4) {
      x = 10;
      y = 6;
      }

      Now did the programmer mean:

      if (x == 4) {
      x = 10;
      }
      y = 6;

      or what they originally wrote?

      To a Python programmer, the Python code above means only one thing. Yes, a mistake can be made (indented incorrectly), but the identical problem can be made in C (put the braces in the wrong spot).

      Oh, and for the record, I've never written any Python at all.

      --

      ...Beware the IDEs of Microsoft...

    6. Re:Indentation syntax has its problems too by Art_XIV · · Score: 1

      >if (x == 4) { x = 10; }
      >y = 6;

      In Python =
      if (x == 4):
      x = 10
      y = 6

      >or

      >if (x == 4) {
      >x = 10; y = 6;
      >}

      In Python =
      if (x == 4):
      x = 10
      y = 6

      So where's the problem?

      I've done a hell of a lot of Perl but Python has been taking over alot more lately. Why? It's got a a milder learning curve, which is important for the other people on my team, should I be hit by a truck tomorrow. It also seems alot better for larger-scale projects.

      Don't get me wrong, though... I'd still rather use good 'ol Perl rather than VB any day of the week.

      --
      The only thing that we learn from history is that nobody learns anything from history.
    7. Re:Indentation syntax has its problems too by dachshund · · Score: 1
      Code from the above example should REQUIRE some comments explaining what x and y are and why they are being changed.

      Regardless of how well labeled/commented the code is, a complex program is tougher to debug when you have to carefully read through every comment to determine whether there's been a (probably text-editor related) indentation mistake.

      Agh, can you imagine debugging something like an MPEG encoder that way?

    8. Re:Indentation syntax has its problems too by dachshund · · Score: 1
      As was said in the above replies, it's probably a failing of C that it allows you to use the undelimited form. However, that hunk of C code will still have the same meaning even if some moron checks it out on their Win2000 box and screws up all the indentation while using Notepad.

      The python code, on the other hand... Well, anything could happen to those indentations. Not to mention that it's a whole lot easier to accidentally hit/fail-to-hit a tab key then to skip a pair of curly braces (not that it's unheard of, of course)

    9. Re:Indentation syntax has its problems too by moocat2 · · Score: 1

      Braces are not always the answer. Did the programmer forget to indent the second line in the block or did he put the line in the wrong place?

      if (x == 4)
      {
      x = 10;
      y = 6;
      }

  57. Re:Problem with Python... by xeer0 · · Score: 1

    There are some alternatives to freeze check:
    This link.
    Also, if that doesn't suit your needs, you could enhance it or write your own... I would sure appreciate it. :)

    --
    "Hey... don't be mean." --Buckaroo Banzai
  58. Re:Hrmph! by xeer0 · · Score: 1

    Good point!
    Moderate this up!

    --
    "Hey... don't be mean." --Buckaroo Banzai
  59. Re:"State" of Virginia? by jazman_777 · · Score: 1
    VA can call itself whatever it wants to, but under the US Constitution it's a state--and the Constitution is the supreme law of the land, accepted by VA over 250 years ago.

    And rejected 140 years ago, and "reaccepted" four years later, with a little friendly persuasion.
    --

    --
    Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
  60. Re:Guido van Rossum Unleashed? by jazman_777 · · Score: 1
    May I assume that the following books will also be available soon?

    Guido van Rossum in a Nutshell

    Is that anything like Prince Albert in a can?
    --

    --
    Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
  61. Implementation *Not* Driving Semantics? by Curly · · Score: 1

    [...] one of my reasons against adding Scheme-style continuations to the language [...] is that it can't be implemented in a JVM. I find the existence of Jython very useful because it reminds me to think in terms of more abstract language semantics, not just implementation details.


    Clearly!
  62. R and Python by hopeless+case · · Score: 2

    Damn, I wish I'd seen the original request for questions.

    I have been studying up on the R language lately, an open source version of S, the statistical language of John Chambers, and I've noticed that R and python are awfully similar in their basic, and novel, language concepts. The R homepage is at

    http://www.gnu.org/software/r/R.html

    The omegahat project, at www.omegahat.org, has developed interfaces between R and python, as well as packges to interface between R and Perl, and R and Java.

    Anyway, I would have liked to hear Guido's thoughts on R or S and how they compare to python. The correspondence of concepts in the two languages in amazing to me, given how different their origins were.

  63. indentation, yes. ...but with a gripe. by thunderbug · · Score: 1

    I like Python's indentation rules. I didn't at first, but I do now. BUT sharing and modifying code is is often a problem, sorry to say.

    What I find a disconcerting is that some folks use 4 spaces and I use a tab set at four spaces. They are not the same and between autoindent and my hitting the tab key, I get some very interesting combinations. Finding the problem can be difficult without a utility.

    It gets even more interesting when I get code that assumes tabs of 8, and because that is too much, 4 spaces are used for the intermediate levels. ...and it is not always obvious that is what's happening.

    Can we agree on a convention? ...or perhaps some pseudo code for the parser?

  64. Re:"State" of Virginia? by 1010011010 · · Score: 2

    http://www.dictionary.com/cgi-bin/dict.pl?term=com monwealth

    commonwealth \Com"mon*wealth`\ (?; 277), n. [Common + wealth well-being.] 1. A state; a body politic consisting of a certain number of men, united, by compact or tacit agreement, under one form of government and system of laws.

    - - - - -

    --
    Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
  65. Re:Said about as much as the lawyers! by QuoteMstr · · Score: 1

    Bullshit. If you can't understand, you don't even have middle-school reading comprehension skills. He said that it wasn't compatable, but that it would be with the removal of the choice of law clause. What is difficult to understand about that?

  66. Re:Argh. We need license compatibility. by runswithd6s · · Score: 2
    You can create a Debian package for it. There's nothing stopping you. In fact, Debian does not require GNU licenses. Debian GNU/Linux is referred to in this manner because of the FSF-recognized name for Linux. Likewise, Debian is NOT an FSF distribution. It's close, but software that is distributed in the "main" repository (the free-software repository) must adhere to the Debian Free Software Guidelines (DFSG); it does not necessarily have to be GNU GPL

    From the DFSG:

    10. Example Licenses
    The "GPL", "BSD", and "Artistic" licenses are examples of what we consider free.
    Where you will run into problems, or rather where you had run into problems, was with Python 1.6[.1]. Debian refused to package this in "main" for the same reasons its license conflicted with GPL. However, Debian doesn't have the same hangup that FSF has with Python 2+. Just look in the package listing for testing/unstable.

    Regardless, I want to clear something up here. If your program depends upon software or libraries that are released under a license that prevents those tools from being distributed in the "main" repository, it does not stop you from packaging your software and including it in "contrib". Your software will not be forced into "non-free" if your license is DSFG-compliant.

    So, start packaging!

    --

    --
    assert(expired(knowledge)); /* core dump */
  67. Definitely overlookable by jacobm · · Score: 1

    When you look at it in the abstract, in a "look at the bug in this fragment" sort of a way, it's obvious. But I've lost at least an hour or so to debugging that sort of thing, and back when I used to be a lab assistant for a beginning programming class I saw people making that error all the time.
    --
    -jacob

    --
    -jacob
  68. Re:Hrmph! by jacobm · · Score: 2

    Absolutely. If you can't handle using character 13 rather than character 59 to end a statement and character 100 rather than character 123 to start a block, you'll be totally screwed when you see the way prolog does it.

    --
    -jacob

    --
    -jacob
  69. Hrmph! by jacobm · · Score: 3

    Does everybody on slashdot think that the only salient feature of Python is that it doesn't use curly braces?

    Get over it!

    I am being quite serious. If that modest syntax change is enough to keep you from considering a language, you're doomed as a programmer to linguistic provencialism that will keep you from seeing some really elegant ways to simplify and modularize your code. Ever programmed in Erlang? Haskell? Scheme? Prolog? You might end up preferring a more mainstream language after all is said and done, but the experience of seeing the new ways of doing things will certainly make those mainstream programs better.

    You'll never get that experience, though, if you get scared by the syntactic differences between those languages and C (which are vast). So do yourself a favor and try to see beyond a language's syntax.


    --
    -jacob
    --
    -jacob
  70. From the Python9 Conference: by Devil's+Avocado · · Score: 1

    Python:
    Programming
    the
    way
    Guido
    indented
    it

    (Don't know if it was actually indented that way, but if it wasn't it should have been!)

  71. Re:Python Security Question by Camel+Pilot · · Score: 1

    What you say is true. Just because you have a firewall in place doesn't mean you can dispense with a root password on hosts behind your firewall.

    "taint" mode is just another level of security to prevent obvious screwups.

    It is good to see Python has likeminded protections.

  72. Re:Problem with Python... by KenSeymour · · Score: 1

    The other way around this is to put you application on a web server and control the
    web server environment.

    If you don't like coding against browser differences, then put as much logic as possible on the back end.

    (For Java, use Servlets/JSP, for perl, use mod_perl ...)

    --
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Albert Einstein
  73. Re:indentation, yes. ...but with a gripe. by fanatic · · Score: 1

    And this is by itself enough reason for me to never use Python. At least twice, I've found myself reading about Python and thinking it's kind of neat sounding, but I always hit the part about syntactically significant whitespace and say, 'No, I think I'll pass'. I admit I'm partial to Perl.

    --

    --
    "that's not encryption - it's a new perl script that I'm working on..." - from some Matrix parody
  74. Re:Frustrated with this interview by tim_one · · Score: 1

    > Guido is a fairly discrete person, and it's
    > always kinda difficult to know what he thinks

    That's why I get the Big Bux to channel him.

    > about functional programming

    No secret: lambda, map(), filter() and reduce() were contributed code. He used to call them minor conveniences. Now he calls them minor annoyances, as they "opened the door" to people trying to use them as the foundation of a programming style Python wasn't designed to support. Guido still uses them himself as minor conveniences, but his brain isn't wired to use them for more than that. The point isn't theoretical purity (either pro or con), but plain effectiveness in practice for programmers of ordinary skill. List comprehensions (a la Haskell or SETL) were added much more recently, and on the latter basis: in the absence of dogmatic abuse, they're *clearer* than the loop-based alternatives. map() can be too, of course, but listcomps are even clearer than map. OTOH, I've never seen a Python program using reduce() that wasn't better written via a loop instead.

    > typing

    Yes, he types. I don't think he's even tried speech recognition yet .

    > Python/Java complementarity or rivalry

    Complementary. Indeed, the happiest Java programmers in the world may well be those who use Jython as a front end for prototyping, managing, exploring and testing their sprawling Java code. Java and Jython work very well together!

  75. Re:Answer the question, dammit! by Cheetahfeathers · · Score: 1

    When it makes a difference if you use tabs or spaces, this makes it _less_ readable, because on reading, they _look_ the same. I cut and pasted some tutorial examples from the web a while back, and it wouldn't work until I made the blasted things tabs rather than spaces.

    Whitespace as part of the syntax... personally annoying to me, but I can deal. Differentiating between different _types_ of whitespace? That is _BAD_!

  76. Re:Problem with Python... by SilentTristero · · Score: 1

    I have the same problem. Same with perl. PCs don't come with it, so I have to jump through hoops to get j.random luser to be able to run my utilities. The only answer for me so far is vanilla C, compiled by me for each platform I care about. I would *dearly* love it if Python (or perl, or java, or any language) could have a facility for compiling into a single native file (or at least a small collection of files) on many platforms (at least SGI,Sun,PC,Mac,Linux).

  77. FSF cares but goes too far by Christianfreak · · Score: 2
    I have to commend FSF for wanting to make GPL perfect and not have any loop-holes or what not but this is going a bit too far. They need to make up their mind and from the sounds of this article they keep changing what certain things mean. How can we expect Open Source/Free software to evolve and become a real continder in the market place if we can't even agree on a license. I love the idealism but this sort of thing needs to stop. I think we all want the same thing, which is choice in the marketplace and real compitition. These sorts of fights will be just one more reason MS users can brush us off

    As far as the State thing, the Python license has a good point, not all states honor the general disclaimer law. This could cause problems for GPL and FSF would be smart to take that into consideration.

    "One World, one Web, one Program" - Microsoft promotional ad

    1. Re:FSF cares but goes too far by The+Pim · · Score: 2
      I think we all want the same thing, which is choice in the marketplace and real compitition.

      Go read gnu.org. That's not what they want at all. Maybe when you realize what they want, what they do won't seem so strange.

      --

      The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
  78. Re:Whitespace and Python as a Teaching Tool by smack.addict · · Score: 2
    I think I would expect more insightful commentaries from someone that has written books published by Oreilly than "No way in hell you can do that with Perl where you have to be an expert in order to read other people's code.".

    That's kinda too generalized and/or clueless, isn't it?

    It is a generalization, but not, it is not clueless. The generalization is, of course, that you have to be a Perl expert in order to be able to read the Perl code of others. It is a generalization, however, that does very much reflect the state of the Perl language--even if it does not hold for every single piece of Perl source code. No one in their right mind would include Perl code in large scale software systems. That's an absolute, not a generalization. Perl has quite simply been applied to problem domains way outside of its core strengths and has, quite honestly, outlived its usefulness.

  79. Whitespace and Python as a Teaching Tool by smack.addict · · Score: 4
    On Whitespace
    I have to underline Guido's side remark about the person who asked about whitespace not having used Python before. When I first encountered Python, I thought the idea of syntactically meaningful whitespace was absurd. Then I realized that I, as a novice with very little understanding of Python, could read some of the most complex code from expert Python coders. No way in hell you can do that with Perl where you have to be an expert in order to read other people's code. This syntactic whitespace remains useful even when you become an expert, especially and expert who has to deal with novices daily.

    Unless your code is for you and only you, readability is perhaps the single most important feature of your code.

    On Python for Teaching
    Guido stated:
    But my *favorite* use of Python is at a teaching language, to teach the principles of programming, without fuss. Think about it -- it's the next generation!

    In a similar vein, I also use Python as a whiteboard language even though I do most of my programming in Java. Specifically, Python let's you write out valid programming logic that reads like English. The result is that by thinking on the whiteboard in Python and then translating into Java, I end up with sounder programming logic.

  80. Re:Easily overlooked - not. by ekidder · · Score: 1
    I would write
    if (x > 10) x = 10;
    as
    x = 10
    if ( x > 10 );
    instead. For me, single-line if clauses get put the other way around. This is to prevent ambiguity and because I was tired of putting braces around a single line :) The indention ideal that Python uses just doesn't work with my style at all - I've tried the language and put it back.
  81. Re:Quibbles about the 2.1 Lic. by jallen02 · · Score: 1

    Interesting, well I suppose I should compare the relative speakers, Guido versus a Guy who spends his life bending language and thought to sound the way he wants it too :-)

    Jeremy

  82. Quibbles about the 2.1 Lic. by jallen02 · · Score: 2

    I think that FSF is very justified in not considering the Python lic GPL compatible.

    Put in the light that once it is compatible they have to live with it FOREVER just like Eben said.

    That is not a decision they should take lightly and it is a good thing to take caution when you are talking about a Lic which thousands and thousands of projects depend on. Something such as this can undermine the integrity of everything.

    The GPL needs to stand up in court but declaring it legal and then watching the Python lic go down in flames because someone abused it on their own software doesnt help GPL any at all since it was declared "compatible".

    The reasons and scenarios are legally to far fetched for me to properly illustrate but unless you have been a lizard under a rock you absolutely know how extreme and far fetched software lic and the law can be.

    It is not something, even if I dislike the GPL on principle, that should be taken lightly if FSF wants to see that the GPL keep as much integrity as possible until it is outright challenged in court or some such. Play it safe.

    BTW: I think posting something like that obviously written only for a small and closed audience is not cool... Not that it wasnt expected given how the letter was written.

    Jeremy

  83. Re:Argh. We need license compatibility. by RevAaron · · Score: 1

    The bloody GPL always causing problems. If you don't like Python's license, don't use it. If RMS and his clan of Gnuzis don't like it, they shouldn't bitch, they should just get over it, and not use it. Or, if it really mattered, make a new implementation of Python covered under the GPL. Or, if you don't like the GPL, boycott code written under it when it effects your life adversely.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  84. Re:Argh. We need license compatibility. by RevAaron · · Score: 2

    Before this get's labeled a troll...

    The GPL is all fine and dandy, but it causes problems. The point of the GPL is to spread it's ideology virually. That's great. But when it's not what you want, find something with a more liberal, tolerant license (LGPL included) or do your own implementation.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  85. It's the mind by jgarry · · Score: 1

    Most assuredly, the funniest Monty Python was the milkman-psychiatrist. The subject matter is both self-referential and time-independent, so unlike most humor it becomes funnier because you know what is going to happen. Deja vu all over again.

    --
    Oracle and unix guy.
  86. Re:Guido van Rossum Unleashed? by e-Motion · · Score: 1

    May I assume that the following books will also be available soon? Instant Guido van Rossum ....

    I'm personally waiting for my copy of Guido van Rossum How To Program.

  87. The FSF has some good points by legLess · · Score: 3
    And contrary to what Guido says, I don't think they're longwinded or hairsplitting. Excerpts from the referenced email:

    Conclusion: in order to be "compatible" in the strict sense, we need paragraph 7 to remove the choice of law clause. We would also recommend that paragraph 8 be changed to say that copying, modification or distribution constitutes acceptance of the license, but we don't have to have that change to agree that the license is fully "GPL compatible."
    They've given him one requirement to make the license fully GPL-compatible, and IMHO it's very reasonable. Virginia, folks, is a very scary place to license software. If you haven't read up on UCITA, do so.

    So we have never allowed a license with a choice-of-law clause to be treated as fully compatible with GPL. Virginia is the worst of all choices, because that state has passed the UCITA law, which adds a whole new range of risks and burdens in the distribution of free software.
    Now, CNRI's lawyers might not like that, but their job is to do one thing: cover CNRI's ass. That's well and good, but the GPL has loftier goals: guaranteeing our freedoms.

    The bottom line is that the GPL is the most powerful defense that Free software has. Yes, the FSF is inflexible, but they're preparing for the worst-case scenario. We'll thank them later, when the GPL stands up in court.

    question: is control controlled by its need to control?
    answer: yes
    --
    This isn't as much "normalization" as it is "don't take so many drugs when you're designing tables."
    1. Re:The FSF has some good points by warmiak · · Score: 2

      "The bottom line is that the GPL is the most powerful defense that Free software has"

      So much freedom that it takes a lawyer to figure it out.
      Thanks, I will stick to BSD-style, no strings attached, real freedom license.

      --
      The only way liberals win national elections is by pretending they're not liberals.
  88. Oh Well by ekrout · · Score: 1

    I was hoping for +1, Funny on the "parent" of this post, but oh well. "You can't...always get...what ya wa-ant!"

    --

    If you celebrate Xmas, befriend me (538
  89. Frustrated with this interview by kalifa · · Score: 2

    There's something wrong with the Slashdot's questions collecting system. Some of the questions that Guido has answered to were not very interesting, and better questions had been submitted by slashdot contributors. But, because they were not among the first to post their questions, they have not been moderated up, and thus their questions have not been picked.

    There were many fascinating issues to discuss with Guido that have been completely missed. Things more relevant than "thoughts or Ruby?", "Favorite MP sketch?", etc... Guido is a fairly discrete person, and it's always kinda difficult to know what he thinks about functional programming, typing, Python/Java complementarity or rivalry, etc... This would have been a great occasion, and we missed it.

  90. Said about as much as the lawyers! by BobTheWonderMonkey · · Score: 1

    Was anyone else completely nonplussed by these answers? I'm not sure anything was said!

    --
    S.
  91. Re:Easily overlooked - not. by xp · · Score: 1
    << Most people, when skimming code, look for the indentation anyway. This leads to sometimes easily overlooked bugs like this one: if (x < 10) x = 10; y = 0; >>

    Interestingly Perl won't allow you to do this either. Perl requires braces even around single statements following if, for, while, etc. So this is not a valid reason for Perl programmers to switch to Python.

    --
    Milk, it does a body good.

  92. On thinking abstractly by Blackheart2 · · Score: 1
    one of my reasons against adding Scheme-style continuations to the language (this has seriously been proposed by the Stackless folks) is that it can't be implemented in a JVM. I find the existence of Jython very useful because it reminds me to think in terms of more abstract language semantics, not just implementation details.

    You find that disallowing a feature because it can't be implemented on a certain platform is a sign of thinking in terms of abstract language semantics?

    Your second sentence contradicts the first.

    BH

    --

    BH
    Fools! They laughed at me at the Sorbonne...!

  93. Re:Guido van Rossum Unleashed? by TeknoHog · · Score: 2
    Guido van Rossum in a Nutshell

    How about the following for Linux hackers:

    Kernel in a Nutshell
    or any other *shell for that matter. Which reminds /me of the phrase ``She sells C shells down the C source.''

    --
    --
    Escher was the first MC and Giger invented the HR department.
  94. It's hard to beat The Cheese Shoppe .... by Curious__George · · Score: 2
    The Cheese Shoppe is a classic. A man comes into a Cheese Shoppe and starts asking for different kinds of cheese. The shoppe owner responds in various ways that he is out of them (including a request for Cheddar to which he replies that he doesn't have "much call for it". At one point Cleese says, "This IS a cheese shoppe, isn't it?" the owner replies "Oh, YES sir, the finest in the area". Cleese asks him on what criteria he is basing that assumption. The owner says, "It's so CLEAN!" Cleese mutters "Well it's certainly uncontaminated by CHEESE!" When he finally says he DOES have a requested cheese it is with the proviso that it's "a bit runny today". When the buyer says that is fine "I like it runny", the shoppe owner looks under the counter and cries "Oh, the cat's eaten it." The store owner finally admits that he has no cheese and has been purposely wasting the man's time. Cleese says "alright, that means I'll have to shoot you, then." BLAAAM. End of skit. PS....not sure that MOVIE SCENES qualify as skits (which were part of the weekly series), but then that's mostly all the movies are is a series of skits with a common thread. . . so I'll let it go this time.

    Curious George

    --
    ***General Consultant to the Human Race*** My opinions are free. You get what you pay for.
  95. Unfavorable View of the FSF? by EraseEraseMe · · Score: 1

    He seems to have had quite a trouble handling the FSF's many hoops to jump through. Were the problems he encountered caused by the FSF's focus on protecting the community, on protecting the original developer, or protecting itself? I hope that this could be clarified by a followup interview, or maybe Guido himself could post with his opinions in a bit more detail

    --
    "Anybody who tells me I can't use a program because it's not open source, go suck on rms. I'm not interested." (LT 2004)
    1. Re:Unfavorable View of the FSF? by Abreu · · Score: 1
      The fact is that the FSF is very dogmatic about the "copyleft" principle embodied in the GPL. They seem to particularly dislike other licenses that permit commercial developers to incorporate the software into proprietary products (e.g. the BSD license). I may be stretching here, but it seems like RMS views people who release software under these licenses as traitors to his cause. I might even go so far as to say that RMS views all commercially developed software with some degree of contempt, even the stuff that is eventually released under the GPL.

      Very true, just see RMS's reaction to the GPLization of QT... He should have praised them diplomatically for their decision, as this was a victory for the FSF and the GPL.

      But instead, he insulted TrollTech and KDE yet again, and no-so-subtly told people to go and use GNOME and GTK instead.

      I believe almost everybody now has issues with RMS... If he is not careful he will be left alone.

      ------
      C'mon, flame me!

      --
      No sig for the moment.
    2. Re:Unfavorable View of the FSF? by janpod66 · · Score: 2
      But instead, he insulted TrollTech and KDE yet again,

      Insulted? In what way? Can you provide details? How can you "insult" a company anyway?

      He should have praised [TrollTech] diplomatically for their decision, as this was a victory for the FSF and the GPL.

      You mean he should have praised TrollTech for their decision not to go out of business? TrollTech's hand was forced: without KDE, Qt would be just one of a dozen obscure commercial toolkits. And without changing Qt to a GPL license, KDE would have had to come to an end.

      What this whole thing shows is that RMS's care and stubbornness in designing the GPL has paid off. Without it, TrollTech would have been able to hijack KDE, a major high-quality open-source project, for their commercial purposes.

      As for TrollTech, I'd continue to view them with suspicion. Their vision seems to be that any commercial user of open source software should pay some commercial company, and they seem eager to want to do whatever they can to make Qt an integral part of whereever Linux goes. That is not the kind of vision many supporters of open source have, and pragmatically, it is also very bad for the long term viability of open source software.

  96. Re:indentation, yes. ...but with a gripe. by Yunzil · · Score: 1
    What I find a disconcerting is that some folks use 4 spaces and I use a tab set at four spaces.

    Well, there's your problem. Tabs are just evil; don't ever use tabs in your code. :) I have my tab key set to insert 4 space characters, if I ever really need a hard tab (like in a makefile), I hit ctrl-tab.

  97. Re:"State" of Virginia? by sulli · · Score: 1

    Well, http://www.commonwealth.va.us is 404... really they should have that, for the purists among us.

    --

    sulli
    RTFJ.
  98. "State" of Virginia? by sulli · · Score: 2

    Well, Virginia is a Commonwealth, as any Virginian knows, so that might be part of the problem!

    --

    sulli
    RTFJ.
  99. So what's good about python? by Tuffnutz · · Score: 1

    The indentation blocking is a shame if only because it's so much of a distraction in discussing the language. I don't know much about python and was hoping to learn why it's useful here, but just about all I gleaned from these comments is that the blocking is controversial and the license is in a legal quagmire.

    So aside from all that, why should I use python?

    _ The bureaucracy is expanding to meet

    --

    _ The bureaucracy is expanding to meet
    the needs of an expanding bureaucracy.
    1. Re:So what's good about python? by gupta · · Score: 1

      this "pack" thing way too crazy.

  100. what he said (MOD PARENT UP PLS) by mkcmkc · · Score: 1
    I'm sure it's been a long and tedious road, but solving this really matters.

    My project, SUBTERFUGUE, is written in Python, GPL'ed, and included in Debian, so I have a (small) dog in this race.

    The FSF has been right about things so far. If you truly disagree with them, make that argument to them (and us). But please don't let exhaustion be the reason for just letting things drop in the current murky state.

    --Mike

    --
    "Not an actor, but he plays one on TV."
  101. Whitespace... what about the underscores!? by darekana · · Score: 1

    Everyone likes to talk about the whitespace... how do you explain the multiple underscores!!!!

    Yuck!

  102. The easiest way to GPL compatibility by RedLaggedTeut · · Score: 2
    The easiest way to GPL compatibility is to release the code as dual license, under GPL.

    If the only problem really is that CNRI doesn't want to be sued, the easy way to do this for CNRI is to license python to someone who takes the risk to be sued, for example our friend Zooko, who then releases it under GPL.

    Maybe, this ceremony would have to be repeated every release of python.

    Apologies for attaching to the top rated post - I'm not a pilotfish.

    --
    I'm still trying to figure out what people mean by 'social skills' here.
  103. Easily overlooked - not. by mike260 · · Score: 1

    Most people, when skimming code, look for the indentation anyway. This leads to sometimes easily overlooked bugs like this one:

    if (x 10)
    x = 10;
    y = 0;


    Is it just me, or is that an instantly suspicious-looking piece of code? I don't think it's 'easily overlooked' at all, it doesn't look like regular C/C++ at all.
    Easy to say in retrospect I suppose, but still...

    ---
    Fruity smells are what I like -- Debbie Gibson

    1. Re:Easily overlooked - not. by mike260 · · Score: 1

      Heh, I can't believe I missed that.

      I was talking about the bracketing/indentation when I said 'doesn't look like regular C/C++' though.

    2. Re:Easily overlooked - not. by mike260 · · Score: 1

      I now realize using indentation for blocking is the "right" answer

      Unfortunately, along with a few others I've had the "wrong" answer burnt into my brain by years of reinforcement. Why not have the parser spit out a 'suspicious construct' warning instead? It would prevent the bugs you describe just as well, and would be one less new trick for old dogs like myself to get rewire their neurons around.

    3. Re:Easily overlooked - not. by mike260 · · Score: 1

      No it wouldn't.

      control_statement
      controlled_statement
      unrelated_statement

      would generate a warning.

      control_statement
      {
      controlled_statement
      another_controlled_statement
      }

      would not.

      The first example is something no sane coder would ever type in C or Perl, so the warning would almost never be issued in error. It would almost always signal either a bug or some bad formatting.

  104. Guido van Rossum Unleashed? by Slashdot+Cruiser · · Score: 2

    May I assume that the following books will also be available soon?

    Instant Guido van Rossum
    Mastering Guido van Rossum
    Guido van Rossum for Dummies
    Learn Guido van Rossum in 24 Hours
    Guido van Rossum in a Nutshell

    --

    Got a full tank of hot grits and a penis bird in the glove box.
  105. Re:FSF love or hate? by FastT · · Score: 1

    No we don't.

    --

    The only certainty is entropy.
  106. Parrot for Dummies by Anonymous+Cowturd · · Score: 2

    I recently bought a 'Parrot for Dummies' Book, but simply do not understand it. Does anyone want to take it off my hands? I'll sell it to whoever makes the best offer.





    if 'fruits de mer' = seafood

    --


    if 'fruits de mer' = seafood
    does 'fruits de merde' = mushrooms?
    1. Re:Parrot for Dummies by Tech187 · · Score: 1

      How comprehensive is the section on Norweigan Blues?

  107. Re:Python Security Question by Meowing · · Score: 1

    Well... perl -T doesn't offer any sort of guarantees. It's not perfect (as bug fixes to taint mode over time will attest) and can (intentionally or accidentally) be bypassed using the documented laundering techniques. That's not to say that the taint mechanism is not useful -- it is a help -- but one must take care not to be lulled into a false sense of security in its capabilities.

    With all those qualifiers out of the way: yes, Python does try to solve simliar problems with its bundled rexec and Bastion modules. Again, this should not be seen as a magic bullet! With enough effort, people can accomplish stupid things in any environment.

  108. FSF love or hate? by mjisgod · · Score: 1

    Its funny, in some /. postings the FSF is villified, while others they are made out to be gods.

    At least we all agree on one thing, M$ is EVIL!

    --
    dave
    1. Re:FSF love or hate? by Computer! · · Score: 1
      I can't agree with that, either. I'm a professional programmer, with kids to feed. I have some observations:

      1. Programmers almost never get to chose which languages to code in. They are usually hired based on their skill in a language the company already uses, or are trained in a language the company (read:CIO) has decided to standardize on.
      2. This whole argument makes me feel great about VB. What's easier than "If" and "End If", automatically capitalized for you by Visual Studio?
      3. There are about 1/1000000th as many commercial software products in Python as there are in C, or C++, or VB or even COBOL. This makes the whole argument kind of moot, doesn't it?


      Anyway, 999 out of 100 programs are written in C++ or VB nowadays, and are written for Windows. Until this changes, Python discussions about Emacs and white space are mostly pointless. Also, I agree with the guy who won't try Python based on /. posts. Who has time to download and install a language every time they want to decide whether or not to use it? He's doing his research here, and has decided to stop researching, based on your attitudes. That doesn't make him an idiot.

      --
      If you fall off a building, go real limp, because maybe you'll look like a dummy and people will be like hey, free dummy
  109. Problem with Python... by MadCow42 · · Score: 2
    First, let me say that I LOVE Python... I use it for almost all of my application development.

    However, the biggest problem that I face is the portability of the code... it's extremely difficult to write a "stand-alone" application that can be distributed. Sure, there's the Freeze tool, but it's a pain to use, and hard to configure properly.

    If I'm writing an app that I want others to use (on a non-Linux system), I'll usually choose C/C++ instead, because I know that I can easily send it out. Otherwise, I end up with an application that needs three installers... (Python, Win32, mine).

    Oh well...

    Freeze-a-phobically-yours, Madcow.

    --
    I used to have a sig, but I set it free and it never came back.
  110. Lawyors vs. Java by noz · · Score: 1

    I believe I speak for all when I say that we wish you the best of luck in getting your dealings with the lawyors to work better than those damn JVMs. My ex-girlfriend's dad is a lawyor, so I've had my fair share of dealings with them. cPython all the way!

  111. Re:Argh. We need license compatibility. by chuqui · · Score: 1

    > Please take a deep breath and go in for one last go-around with the FSF lawyers. Pretty please?

    Why? the FSF position seems to be "we're happy to compromise, as soon as you do it our way" and "we won't tell you how to fix it, just that it's wrong. Keep guessing"

    When will the FSF start working with these groups, instead of simply demanding everyone do it their way or else?

    --
    Chuq Von Rospach, Internet Gnome = When his IQ reaches 50, he should sell
  112. use vs. copying by kataklyst · · Score: 1
    it is the terms under which you can use/copy/modify GPLed software.

    No, the GPL is the terms under which you can copy/modify GPLed software. The GPL grants additional rights beyond what you would get to, say, a newspaper. If you don't agree to the GPL, you may not distribute copies of the work. However, you may still use it in any way you like, just as you may use a newspaper.

    1. Re:use vs. copying by ryants · · Score: 2
      Sure... fair enough.

      That doesn't change the fact that it is a contract.

      Ryan T. Sammartino

      --

      Ryan T. Sammartino
      "Ancora imparo"

  113. Re:Perl, perl and PERL by utopian · · Score: 1

    probably learnt it from a book with 'PERL' written in 6 inch high gold lettering on the front cover and a promise to be a great programmer 'in hours!'

  114. no answers on efficient compilation by janpod66 · · Score: 2
    Unfortunately, Guido wasn't asked, and didn't provide answers, about efficient compilation for Python into standalone executables. There are actually efforts underway, but it would be nice to find out more about his thinking on them.

    In principle, Python could be compiled like C, C++, Java, Fortran, Eiffel, etc. into standalone executables. That would both simplify deployment and (if done well) improve speed. Previous attempts at this have not been particularly popular or successful, however.

  115. Oh Baby! We Have a Genius Here! by The+Critisizer · · Score: 1

    Indeed.