Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Ask Guido van Rossum

Roblimo posted more than 13 years ago | from the land-of-the-pythons dept.

Programming 202

This week's interview is with Guido van Rossum, a man who, as they say, needs no introduction. (Not around here, at least.) To learn a bit more about him, check his personal page. You might want to ask him about Python 2.1, which was released today. One question per person, please. We'll send 10 of the highest-moderated ones to Guido about 24 hours after this post went up, and will run his answers as soon as he gets them back to us.

Sorry! There are no comments related to the filter you selected.

Favourite Python sketch? (5)

abischof (255) | more than 13 years ago | (#285871)

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 ;).

Alex Bischoff

Re:Python 3000 (2)

cduffy (652) | more than 13 years ago | (#285872)

I've got to disagree with you wrt the C API -- I find it quite pleasent (and though I haven't worked with TCL, I do have prior experience with the C APIs of Perl and, to a limited extend, Scheme). Threading, on the other hand, is a real issue (has Stackless Python resolved it?) and I'm as interested as you to find out when it'll be fixed in the official Python implementation.

Of course, there's also JPython, which has fantastic integration between Java and Python code, and resolves the threading thing... so if yer extending Java code, it's really a no-brainer (IMHO).

Do you believe in Object Oriented Programming? (2)

defile (1059) | more than 13 years ago | (#285875)

Almost every modern high-level application language today supports, and perhaps forces the Object Oriented Paradigm (OOP). Students are encouraged to define and use objects whenever possible. Python's standard library seems nothing but objects. Java is the same. Newer technologies, like SOAP/Microsoft .Net/blahh are the apex of this concept.

When I refer to the OOP, I mean the drive to decompose all programming into components, not necessarily the individual concept of having classes with methods and constructors and context-sensitive results, etc

Application developers accept the OOP as the only way and consider those who refuse it to be uncivilized coder barbarians. Clearly, one can only bring sanity to programming via the OOP. But what is it really bringing?

Most of the ideas that the OOP promotes are good programming practice anyway. That is absolutely not what I hate about the OOP.

In the very ideal cases, you can create a reusable object/module that other people can enjoy. This is very rare, though. UNIX is a good example of an easy to use interface that allows for massive code reuse. The Win32 API, while affording code reuse, has a miserable interface that makes Windows programming a chore.

Without going into a huge tirade; Modularity on that level is good. It's worth it to struggle with the interface, because the alternative is 100 man-years worth of functionality that you need to implement. On a much reduced level, trying to deal with the OOP just doesn't seem worth it.

The problem with the OOP is that it encourages all code to be tiny little modules with it's own unique domain, which helps complicate the code both visually and in terms of execution.

For every beautifully designed reusable component, you have a thousand more that are confined to a single project and do nothing but add complexity and visual noise to an otherwise simple idea.

The Objects Everywhere philosophy seems to promote complexity, rather than simplicity. The less code, the easier it is to understand, the better off it'll be. Python does achieve many of these goals, but I can't understand why the push to OO'ize it all.

Bad programmers can write bad code no matter what, and there's a vast army of bad programmers out there, but I'm not sure I've ever seen good code that employs the Objects Everywhere ideal.

Does this make sense? What are your thoughts?

Re:Indentation? (2)

Jason Earl (1894) | more than 13 years ago | (#285878)

Good programmers indent nested blocks, but that's just to make the code easier to read. The parser doesn't care.

That's really the beautty of Python's whitespace blocks. Both the programmer and the parser are looking at the same cues for block nesting. I am sure you have debugged C code that was missing a brace (or worse that had one misplaced) but was still indented "correctly." Your mind thinks that everything is hunky dory because the code "looks" right. This doesn't happen very often if you are a skilled C coder (with an intelligent text editor), but it does happen. And it happens a lot with newbie programmers. I was teaching my little brother Perl at one point, and he had all sorts of trouble with braces. However, when we switched to Python there was no longer any need for him to think about which braces matched up. I didn't believe that Python's significant whitespace was a good idea either, at first, but I am a believer now.

Oh yeah, and since the Vim % command (jump to matching bracket) doesn't work with Python code, do you know of a macro to replace it?

I am not a vi user, so I can't help you there.

Incompability w/ GNU GPL: Any chance to resolve it (1)

juhtolv (2181) | more than 13 years ago | (#285879)

It is well known fact, that the latest versions of
Python has licence, that is incompatible
with GNU GPL. I know that RMS himself has tried to
negotiate to rectify that problem. But what is
current situtation? Do you see any chance to resolve the problem? How likely is it, that the
problem will be resolved?

Other languages (2)

NewWazoo (2508) | more than 13 years ago | (#285882)

What other languages do you use? Why do you use them? Are any of them better than python? When can I expect Parrot to be released? ;-)


Python directions (1)

getafix (2806) | more than 13 years ago | (#285883)

Would you hold up the rewriting of python to use a stackless implementation because Jython or other implementations will not be able to implement it? Where is the line between pushing python forward, and holding it back so that it works nicely with everything else ?

Thanks for a great language.

Stackless Python? (4)

Tumbleweed (3706) | more than 13 years ago | (#285886)

Do you have any plans to merge Stackless Python with Python? If yes, when? If not, why not?

Re:Komodo (2)

crisco (4669) | more than 13 years ago | (#285887)

Since the original question referenced VB and Kylix I'm assuming the poster wants a 'GUI builder' type of IDE. I believe the most common Python approach to GUI widgets is through Tk. In that case the question might be, are there any Tk GUI builders that handle Python. I don't know the answer, I'll leave the searching as a reader exercise. There are a couple of basic IDEs for Python, the Windows version even comes with the install. These are about on par with Komodo, faster but with different features.

Chris Cothrun
Curator of Chaos

Ruby (5)

Luke (7869) | more than 13 years ago | (#285891)

Thoughts on Ruby?

Getting your company to use Python vs. ... (1)

buffy (8100) | more than 13 years ago | (#285892)

Given Python's more limited exposure to the commoners, I've had varying amounts of success getting companies that I've worked for to actively use Python. Those that I have convinced, have grown to love it, and all is good with the world.

What are the five most compelling arguments that _you'd_ offer to a company doing web development, system administration, etc... to use Python over other interpreted languages such as Perl, TCL, etc...


Conflict with GPL (5)

MAXOMENOS (9802) | more than 13 years ago | (#285897)

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?

ObJectBridge [] (GPL'd Java ODMG) needs volunteers.

Re:Python 3000 (1)

Xar (11113) | more than 13 years ago | (#285898)

Python can spawn multiple threads, yes; but Python can only interpret bytecodes in one thread at a time. What does this mean? Well, your C extension can go about its merry way in its own thread, but the moment you are back in Python-land everyone is competing for the one and only interpreter thread. As I said in my initial post, it's a workaround. It is well known that Python does not completely and properly support threads, as Tcl (and many other script languages) does. Guido has said this is a deficiency in the current C implementation and will be addressed in the future.

Python 3000 (5)

Xar (11113) | more than 13 years ago | (#285901)

It's been a while since I've seen any mention of Python 3000--aside from the recent April Fools joke, that is. I love Python as a language, and use it both professionally and personally. But, Python's current implementation is lacking; the interpreter is not multi-threaded, causing large Python applications (such as Zope) to implement various workarounds that only partly address the problem; and the C API is rather...unpleasant. Working with the Tcl C API in an embedding situation is much, much better, IMO. Will Python 3000 address any of these concerns? Any information on a timeline, or current status?

Why do you care so much for GPL compatibility? (1)

Carl (12719) | more than 13 years ago | (#285902)

It seems that you are personally involved in getting the new Python license GPL compatible so that Python can be mixed with code released under the GPL.

The Apache people seem to have given up on ever getting their license compatible with the GPL since it seems to much work to get the language about the trademarked words right. So they just accept that people writing GPLed software can never use code distributed under the Apache license. It does not seem to hurt the Apache project to much.

Why do you care so much about Python being GPL compatible? And what work should still be done?

I loved the original CWI license by the way, it was short and to the point. Is there any way to get that back as standard license? And is was GPL compatible as a nice bonus.

Structured Design. (5)

Xerithane (13482) | more than 13 years ago | (#285904)

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?


Re:Structured Design. (2)

NMerriam (15122) | more than 13 years ago | (#285909)

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.

Well, that's the answer, i'm not sure why it isn't acceptable. One of the main stated goals with Python is that they didn't want a language that had completely different formatting depending on who wrote it, so they made formatting part of the language. This makes it much easier for non-programmers (like me) and beginning programmers to pick it up.

I find, because of my background, it is much easier to read code that uses braces

but someone with no programming backgound wouldn't have that bias, so if you're inventing a new language, why feel hindered by older syntactic conventions?


GUI? Tkinter? (3)

Lumpish Scholar (17107) | more than 13 years ago | (#285911)

(It has to be asked every once in a while.)

Any movement away from Tkinter, and toward something else, as the pretty-much-standard programming interface for graphical user interfaces?

Any movement towards a Tk library that *doesn't* use Tcl?

Hi, I've never heard of you (1)

Migrant Programmer (19727) | more than 13 years ago | (#285913)

Do *you* think you need an introduction?

Re:Performance (1)

nd (20186) | more than 13 years ago | (#285914)

I don't think that's feasible due to the runtime nature of Python. It would almost certainly require a type of "engine" to handle these features (think about all the cool things you can do with classes that aren't possible in C++), which isn't much better than byte code.

Re:Performance (1)

listen (20464) | more than 13 years ago | (#285916)

In order to do this, you would need
either some pretty amazing type inference, or variables with declared static typing. There is some work on this (Types-SIG). The main change would be that you can't change the type of a var at runtime, eg
a = "Popsicle"
a = len(a)

would be disallowed, as a would be presumed to only hold strings. This doesn't happen too much anyway, as it is confusing..

Ruby (2)

jilles (20976) | more than 13 years ago | (#285917)

I've recently come across Ruby and I must say that at first site it has all the features (after all it was inspired by python) that made python a success and some more. What are your impressions of this language and would you be willing to give up python for it or some other language?

Python and UML (2)

Rocky Mudbutt (22622) | more than 13 years ago | (#285919)

I have seen a couple of Java based Unified Modeling Language [] tools but no Python support or implementation. It would seem natural to develop in python based on UML, so this must be a large gap in the python suite. What do you think of designing with UML and implementing in python?

Thorn [] is an opensource UML editor written in Java with JPython scripting but no python code generation.

ArgoUML [] is an opensource UML editor written in Java with no current python code generation

Re:Data Structures Library (1)

churchr (24226) | more than 13 years ago | (#285921)

What kind of data structures do you want? Python has integrated support for dynamic arrays and dictionaries. You can get matrices and some other data structures as part of the mathematics extensions.

Blind people? (2)

rhaig (24891) | more than 13 years ago | (#285923)

I have some friends that are extremely talented programmers that find python very difficult to use because it relies on whitespace for code block delineation. They're blind. With that in mind, is it still a great idea to use whitespace (not braces) just so the code will all look alike?

Re:does Python need a CPAN? (1)

pthisis (27352) | more than 13 years ago | (#285925)

They're working on it. Python 2.1 includes module metadata, which is a first step toward creating an automated CPAN-style module repository.


Re:Komodo (2)

Pengo (28814) | more than 13 years ago | (#285926)

Have you actually used Komodo?

even compared to Visual Basic it really sucks... like.. REALLY sucks. I would be embarrased to ship a program built with that IDE builder.

Would you like a Python based alternative to PHP/ASP/JSP?

Python IDE (3)

Pengo (28814) | more than 13 years ago | (#285927)

Do you know if there are any projects on it's way to compete with Kylx or Visual Basic based on Python.

Would you like a Python based alternative to PHP/ASP/JSP?

Performance (4)

debrain (29228) | more than 13 years ago | (#285928)

Is it possible to make Python as fast as C/C++? In particular, is there a way to compile Python into system code (as opposed to byte code)? If there isn't, will there ever be?

Re:Python directions (1)

jonathan_ingram (30440) | more than 13 years ago | (#285929)

See the website for Stackless Python [] to see what you've been missing. It's not an official project, but looks to be fairly well advanced.

Re:Structured Design. (1)

jonathan_ingram (30440) | more than 13 years ago | (#285930)

Almost everyone that writes in languages such as C indents their code to reflect the structure of the code -- this means that information about the structure is in 2 different places -- the code itself, and the indentation. When they get out of whack, the compiler looks at the code, and the human looks at the indentation. Python removes this problem by caring *only* about indentation.

You might mutter a while about whitespace the first few times you write a Python program, particularly if you've come from a C or Perl background. It's when you come back to a Python program 6 months later, and find that you can still understand it perfectly, that you realise the benefits of the stylistic sanity Python enforces.

Perl might be trying to be more like a natural language -- but natural languages are not natural for algorithmic specification.

Thoughts about REBOL? (1)

netless (30999) | more than 13 years ago | (#285935)

especially new REBOL/View.

Re:Did you approve of the Parrot joke? (1)

cmg (31795) | more than 13 years ago | (#285939)

I really hope this is a joke.

Lots of language names have been jokes or plain silly. C C++ C# Java

Re:Structured Design. (5)

Valdrax (32670) | more than 13 years ago | (#285942)

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 fail to see why there would be any other reason. Furthermore, I fail to see why there should even need to be a better reason. Why do you have whitespace at all? There are only 2 real answers: easy parser writing and human readability.

Python's style makes it easy to see blocks of logic. It also forces you to think about how your code is organized by exposing these blocks to you at all times. Braces, parentheses, brackets, etc. are easy to lose track of in complex single-line statements. You have to spend too much time thinking about whether or not you've got your puncuation matched up properly. Python eliminates this confusion by exposing logical blocks. Besides, properly formatted and readable C code should already be spaced out like a Python program. Python just eliminates the redundant punctuation.

Typically, the people who complain the loudest about enforcing spacing in syntax are the same people who write those tangled, dense, single-line statements in C and Perl that inspired their respected obfuscated code contests. You don't need the ability to cram 5 lines of Python in 1 line of Perl. It just hurts maintainability, and there's really no compelling argument for keeping source code dense and compact anymore if it doesn't add speed and remove bloat. (Forgive me if I have unfairly tarred you with this brush, but this has been my general experience.)

(In response to another post:)
Also, I've never seen a source-control system mess with the spacing of a file before. That's just odd. Be consistent with using either spaces OR tabs and your Python code will be much easier to store. I'm not saying it doesn't happen. I'm just saying that bugs in certain tools that weren't written with Python in mind shouldn't be a black mark against the whole language.

Implementing Everything in Python (2)

jfunk (33224) | more than 13 years ago | (#285943)

I recently started using Python and I now use it for everything, including an interactive shell. Thanks.

One thing I see in Python-land is that there is a tendency to implement everything in Python. I just submitted a design for a program that I want to write in Python and I used Sketch for diagrams, despite having CorelDraw for Linux right here. It seems that no Python programmer is happy with having a component written in another language. Many other languages don't interoperate as well as in Python but those programmers seem happy with mixing Perl and C, for example. Look at Zope. It has it's own web server. I know it's faster, but why do you think this is happening with Python specifically?

Strangest use of Python (5)

Salamander (33735) | more than 13 years ago | (#285944)

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?

Re:Performance (2)

segmond (34052) | more than 13 years ago | (#285945)

No, Python is interpreted, it is a tradeoff, the speed you get from python is in terms of development, for very large projects you might see one line of python code for ten lines of C code or one line of python code for 5-7 lines of C++ code. Take your pick. Nevertheless, Python has an API that allows you to invoke functions written in C and C++. As programmers, you know the 80/20 rule, 20% of your program takes 80% of the time, you can code that 20% in C/C++, and the rest in python, then with the API call that 20%, thus saving incredible time in development.

Re:efficient compilation and standardization (2)

segmond (34052) | more than 13 years ago | (#285946)

I personally believe that Python bytecode is very efficent, take the case of Java bytecode, it is just as efficent, to over optimize it will put very serious constraints on what python does and can do, it is a simple tradeoff, the speed in python all lies in RAD.

Re:Python 3000 (2)

segmond (34052) | more than 13 years ago | (#285947)

From someone who has used the Python C API, I have to disagree with you, in no way do I find it unpleasant, it is so easy to work with, compare it to Perl C extension API, I haven't played with TCL C API, but you might be comparing apple and oranges, as we know tcl and python are on two different levels. A comparasion with Perl and Ruby will be more appopriate.

Re:Data Structures Library (2)

segmond (34052) | more than 13 years ago | (#285948)

You have all the data structures you need, perhaps your skills are lacking. A list is already given with you, with that list you can implement a stack, queue, etc using the existing methods! A dictionary is given to you, with which you can implement a set/hashtables, the only thing that isn't native is trees, which is very easy. What I will like to see tho, is a Collections framework just as in Java, that would be cool.

Re:[j | c]Python (2)

segmond (34052) | more than 13 years ago | (#285949)

I think it is very wonderful, I can't stop talking about JPython, the best of both worlds, mixing python and java, coding with pythons wonderful fun interpretter environment, and getting to use stable java libraries. Saves so much time with the java compile cycle, yet, you can write your java servlet or a swing application in python. Guido probably doesn't care, his work is python, but this shows java's potential.

Re:Conflict with GPL (2)

segmond (34052) | more than 13 years ago | (#285950)

Does the license matter? It is not like your source code or bytecode is subjected to the license. I say, if you are so GPL nuts, let the free software foundation write their own implementation.

Re:Stackless Python? (2)

segmond (34052) | more than 13 years ago | (#285951)

I dobut he will, stackless is amazing, but I dobut it, I mean, there are many python implementations with many nifty things, how about Jpython? When does it stop? But I sure look forward to it tho, as far as it doesn't bloat it. :)~~

self (2)

segmond (34052) | more than 13 years ago | (#285952)

The most annoying thing in python for me, is when walking with classes, and having to reference all local variables and method with the self class. self.It self.gets self.annoying self.and self.I self.believe self.reduces self.readability. As you can see, lots of "selfs" over your screen is annoying, I know that there is a hack out there to remedy that, but is there any immediate plan to fix that in the future?

wxPython (3)

segmond (34052) | more than 13 years ago | (#285953)

Is there any plan to adopt wxPython ( as the GUI standard? The Tk interface looks butt ugly, and I am sure you have heard that many times, what do you see as the advantages and disadvatages for using wxPython over Tinker?

Practical Vs. Ideal (1)

xeer0 (42098) | more than 13 years ago | (#285962)

Is there anything in Python that you would like to fix, but for whatever reason you can't (i.e. it would break to much existing code, everybody else hates it or it's just not 'right')? If so what is it and why can't it be fixed?

(BTW, I'm not saying anything is wrong, just curious...)

Komodo (2)

wiredog (43288) | more than 13 years ago | (#285963)

Komodo [] At Active State [] .

[j | c]Python (5)

seanw (45548) | more than 13 years ago | (#285964)

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)?


Licensing issues (1)

jameson (54982) | more than 13 years ago | (#285967)

What is being done to resolve the current licensing dispute between the FSF and CRNI?

Re:Conflict with GPL (1)

jameson (54982) | more than 13 years ago | (#285968)

But one of Python's features is that you can use it as an embedded scripting language. However, 1.6.0 and 2.*, not being compatible with the GPL, can't be used for embedding on GPL projects, so people will have to continue using 1.5.2.

Re:Python (1)

questionlp (58365) | more than 13 years ago | (#285970)

Does anyone know the speed of the unladen African Python?

Why "None"? (3)

po_boy (69692) | more than 13 years ago | (#285975)

First, thanks for Python!

I have long wondered why the value None in python is named "None". It's pretty common in other languages to call that thing (or something very similar) "NULL". Were you trying to differentiate None and NULL in some way, or do you just like the way "None" sounds as you read code?

does Python need a CPAN? (5)

po_boy (69692) | more than 13 years ago | (#285976)

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?

Politeness (2)

eAndroid (71215) | more than 13 years ago | (#285977)

I know first hand that you have an uncanny ability to remain calm and level-headed. I emailed you once a flame--it even contained several instances of "DIE"--that while done with some jest was quite insulting. Your reply was not only civil but combined with the fact that you even bothered to reply left me feeling quite embarassed (and rightly so).

What is your secret for keeping your cool when discussions get heated, particularly when techies tend to be very loyal to their causes?

Honestly, now (2)

Devil's Avocado (73913) | more than 13 years ago | (#285978)

Don't you ever get sick of talking about Python? Are there times when you just want to talk about your collection of scotch-tape dispensers or your love of shuffleboard? Do you feel sad that people pidgeonhole you as "Guido van Rossum, the Python guy" or "Guido van Rossum, the father of Python", when perhaps you'd prefer to be "Guido van Rossum, the ballet dancer" or "Guido van Rossum, the Buddhist monk"?

In all seriosity (?) are there times when you overload on Python and just have to get away for a while?


Re:Perl? Bah! (1)

Camel Pilot (78781) | more than 13 years ago | (#285979)

Or for converting all your Python scripts into Perl.

Development of Language Bindings (4)

Rexifer (81021) | more than 13 years ago | (#285982)

How closely does the primary Python development team interact with the other language binding efforts (mainly Jython)? Anyone who's hung out in Slashdot seems to have a rabid attachment towards their native tounge, so to speak, and I've found it refreshing that the Python community "plays nice". Is there a lot of cross-pollenation(sic) between the groups?


Video Interview (1)

mccormi (82688) | more than 13 years ago | (#285983)

For a video interview of Guido van Rossum at Python 9 check this out [] at Technetcast []

Garbage Collection (1)

Fnordulicious (85996) | more than 13 years ago | (#285984)

Is Python going to continue using a simple reference counter a la Perl, or will it be improved to use a more modern garbage collection system such as the venerable mark-sweep or even a generational system?

I ask this because I'd like to see a real garbage collector in a scripting language. I was sorely disappointed when I found that Python was using basically the same crufty reference counting mechanism as employed in Perl, supposedly because it was 'fast and easy to implement'. But the deficiencies of reference counting collectors are well known, the most obvious being the incapability of a reference counting collector to deal with cyclic garbage.

The main excuse for using a reference counter, particularly in a scripting or interactive language, is that it is a simple algorithm and is very fast in comparison to other collectors. However the cyclic garbage problem is a subtle and nonobvious source of leaks in programs, particularly ones which have a long life and relatively extensive creation/destruction cycles.

A number of successful workarounds for handling cyclic garbage with reference counters have been proposed and implemented. One simple solution is to implement an 'ephemeral' collector in addition to the reference counter, one which uses a more complex algorithm such as mark-sweep, one able to handle cyclic references without problem. The collector is termed ephemeral because it operates only on regions of store which are not in current use, thus avoiding synchronization problems with actively mutating data.

The following are references to papers by Paul Wilson of the University of Texas, Austin. He has written two important surveys of the fields of garbage collection and automatic storage allocation, two sides of the same coin of automated memory management. I would recommend that whoever is maintaining the collection mechanism of Python spend some quality time with both of these papers and then follow some of the bibliographic references to get an idea of more optimal solutions to the automatic memory management problem.

Another good place for links on garbage collection is the somewhat imprecisely labeled section on Memory Management in the Open Directory Project, ement

Re:Data Structures Library (1)

GrEp (89884) | more than 13 years ago | (#285987)

Linked lists, queues, deques, priority queues, AVL trees, Red-Black trees, B-trees,graphs,sets,digraphs, and any other useful data structure that you would like encapsulated.


Re:Data Structures Library (2)

GrEp (89884) | more than 13 years ago | (#285988)

Python is about simplicity of expression. When doing advanced programming it is nice to have a large set of encapsulated data structures. After coding a data structure 5-6 times it ceases to be instructional.

You can look up data structures anywhere, but developing clean algorithms takes "skills".


Data Structures Library (5)

GrEp (89884) | more than 13 years ago | (#285989)

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?


Python's 2 biggest shortfalls (1)

brunson (91995) | more than 13 years ago | (#285990)

First, let me say I am a huge Python fan and advocate. It is my language of choice and I use it to develop applications both at home and professionally. That said, I see two major weaknesses in Python. First, the lack of function overloading based on parameter signature is, in my opinion, a missing piece of functionality that would be a huge boon to Python's OOedness. Secondly, Python's thread support is almost worthless without a multi-threaded interpreter. Can you speak to when and if these two major shortfalls will be addressed? Oh, and just for the counters [] : Perl Sucks, Python Rules. :-)

When governments fear the people there is liberty.

Re:Python directions (1)

brunson (91995) | more than 13 years ago | (#285991)

You seem to start at the premise that a stackless implementation is better than a stack based one and that Python *wants* to move in that direction. Stackless implementations are usually faster, but you lose ease of recursion and reentrancy. This is the first I've heard of Python going stackless, have I missed something?

When governments fear the people there is liberty.

Re:Python's Relation to Knuth's Conjecture (2)

OmegaDan (101255) | more than 13 years ago | (#285995)

I've actually written a porn bot in python/glade ... "beelzebot" ... :) Its an automated usenet porn downloader/decoder.

Language Specification (3)

patnotz (112592) | more than 13 years ago | (#285999)

While I love many things about python, one thing bothers me. It seems that it's the interpreter that defines the language rather than a language defining how the interpreter should act. One example is the "++", "--" etc. operators and another is the functionality path module. I often write scripts with 2.0 at work only to find thy don't run on my Debian 2.2 system at home (stable Debian's python is 1.5.2).

Are there any plans to set some kind of standard language specification that will hold for a while?

Fat snakes don't hunt (2)

graybeard (114823) | more than 13 years ago | (#286000)

I learned Python from the "Internet Programming" book, and I love the lean and mean Python. Because of the recent burst of development, it seems to me that lots of new features are being stuffed into the language. Is my perception correct? Is there a danger that Python will forfeit two of its best features, simplicity and cohesiveness, merely to appease a few complainers?

Python's Relation to Knuth's Conjecture (2)

matroid (120029) | more than 13 years ago | (#286003)

In the upcoming volume IV of Knuth's TAOCP, Seminumerical Searches for Hoaring Triplets, he conjectures the following about the Theory of Programming Languages:

Computers are ultimately a tool for their users. As such, modern programming languages should allow the users of these inherently unwieldy tools means of effective and efficient control. In volume 1 of TAOCP, we proved that all computer uses fall into one of two categories: searching for pr0n and viewing pr0n. Thus, any modern computer language should have as its core requirement the shortest semantic expressions for searching and viewing pr0n. (As usual, I will cheerfully pay $2.56 to the first finder of any pr0n that I have not already found).

Along these lines, I pose the following questions:

  1. How effective is python at finding me pr0n?
  2. What is the shortest python program that you know of that will allow me to veiw such pr0n?
  3. Do you have any good pr0n?
  4. Of Donald Knuth?

Thank you.

What is *your* idea of Python and its future? (5)

Scarblac (122480) | more than 13 years ago | (#286004)

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.

Re:Performance (1)

StandardDeviant (122674) | more than 13 years ago | (#286005)

It's an interpreter-based language. You can tweak all you want but there is a finite limit to how fast it will ever be. In any case for most of the problems it is meant to solve it is fast enough (i.e. you'll need C (or Fortran) extensions to do fast numerical code, like if you have a 512K by 512K matrix to do a transform on, and this has been done with NumPython; you'd probably never write a device driver in Python; but for writing a network client or GUI it's plenty fast (eons of time are spent waiting for a byte from the wire or an action from the user)). These same factors apply to Perl/Java/etc. just as much.

News for geeks in Austin: []

Which "perfect couple" (views on OCaml/Python)? (1)

kalifa (143176) | more than 13 years ago | (#286013)

In 1998, you had written an article titled "Java and Python: a perfect couple", in which you envisioned jpython as a killer development environment, arguing that the complementarity between a modern scripting language (Python) and a modern system language (Java) was a natural continuation of what had previously happened with the huge success of the C/sh couple under Unix and of the VB/C++ couple under Windows. The Java/Python couple would become the next "perfect couple", more modern, and multiplatform.

It didn't happen. In part because Java still hasn't lived to its first expectations, and also because Python, although you still seem reluctant to admit it, is powerful enough to replace/rival with Java in many areas.

Still, the modern/multiplatform "perfect couple" language programming concept is more relevant than ever. What are your views/hopes on this today? In particular, somebody had attempted, with Vyper, to implement an OCaml-based Python interpreter. OCaml has most of the technical virtues of Java, can also please the adepts of functional programing, and, perhaps more importantly, has high performance compilers which Java does not have. Thanks to this performance gap, the distinction between OCaml and Python is much clearer than it is between Java and Python. So, if Vyper, or a similar project was reactivated and successful, would you support it, and would you consider getting involved in it, perhaps even considering dropping in the long term the C-based interpreter?

Re:Did you approve of the Parrot joke? (1)

cmat (152027) | more than 13 years ago | (#286017)

I've seen this attitude towards Open Source software, which can be summed up somewhat like this: "If people that advocate OSS want to gain marketshare they better play by the rules", or "I can't get my boss to use OSS in our department because he thinks it's a toy, and not a commercially viable tool".

I think that it's more the other way around. OSS I don't think was ever a movement to "take over" the corporate world, and I think it's been sensationalized to much as such. Rather, I believe the philosphy of OSS and the Free Software Foundation has always been more "if the tool gets the job you need done, use it. Oh, and publish your source so you can benefit from others looking at it, and others can beneift from looking at your code and learning".

Anyways, it's totally off topic, but I needed to rant a bit. ;)

Design thoughts... (1)

cmat (152027) | more than 13 years ago | (#286018)

Hi Guido,

As a language designer, why did you decide to start off with Pascal as a base for Python? What sort of things did you like about Pascal's syntax and structure which helped this decision? And now looking back, has Python expanded and changed so much that you would have changed this initial design consideration?

Cheers! Chris

Python v. Perl (1)

TheLocustNMI (159898) | more than 13 years ago | (#286019)

Perl vs. Python. What is your take? It's a common argument, and I'd just like to hear it from the horse's mouth (er, rather the snake's mouth).

I personally am a Python man myself, but only after attempting Perl on a project, becoming frustrated, and then writing the app in Python instead, in a fraction of the time (and NOT knowing Python at the beginning).

Python is gaining much ground, especially in the realm of embedded scripting. Does Perl stand a chance in the future?

Indentation? (2)

fm6 (162816) | more than 13 years ago | (#286020)

Every other programming language I know uses some kind of visible token to indicate code blocks -- curly brackets, begin/end, whatever. Good programmers indent nested blocks, but that's just to make the code easier to read. The parser doesn't care.

In Python, indentation is the token. What's the rationale for this? Do you get a lot of flack from people who prefer the old-fashioned way?

Oh yeah, and since the Vim % command (jump to matching bracket) doesn't work with Python code, do you know of a macro to replace it?


Follow-up Questions (2)

FortKnox (169099) | more than 13 years ago | (#286022)

Follow-up questions are:
What's your favorite Monty Python Quote and Movie?

python versus perl (2)

sv0f (197289) | more than 13 years ago | (#286029)

(1) who would win in a fistfight, you or larry wall?
(2) who speaks more languages, you or (that supposed linguist) larry wall?
(3) if you could eliminate one planet from the solar system (besides the earth), which one would it be?
(4) how do you feel about the euro?

Python (2)

Floyd Tante (210193) | more than 13 years ago | (#286035)

What Is Python? Understanding Them : Pythons are relatively primitive snakes belonging to the subfamily Pythoninae within the family Boidae. Boidae, in turn, is one of 11 families in suborder Serpentes, The Snakes. Within the subfamily of pythons, arboreal pythons with heat-sensing pits along their lips (green tree pythons) are grouped seperately from terrestrial pythons that have heavy bodies and short tails
(blood pythons). Each different type of snake eventually ends up with two names, one for the genus and one for the species. When isolated population exits that are still identifiable as the same type of snake, a third name, the trinomial, is added.
The term primitive indicates that these snakes were some of the first snakes to evolve. Primitive snakes display features that link them to lizards. These features include a rudimentary pelvic girdle in the form
of cloacal spurs, and lungs of equal sizes . Advanced snakes, like the rat snakes and whip snakes, have only one functional lung and no cloacal spurs.
Pythons are divided into about 26 species, depending on which authority you accept. Pythons range in size from very big (Burmese and Reticulated pythons with the potential of over 20 feet and over 200
pounds) to small (Children's pythons do not get much bigger than 24 inches '61cm' in length) . No matter what the size , they are all constrictors . Some burrow-hunting species have developed novel ways of
using thei coils to catch prey within the confines of a burrow but they are still constrictors nonetheless . Most pythons are nocturnal hunters and some species have heat sensory pits along the edges of their lips
to aid in finding warm-blooded prey .

Pythons Versus Boas : Many people don't know the main difference between boas and pythons . Boas are termed ovoviviparous , this means their eggs inside the females are surrounded by a membrane
instead of a hard shell like pythons . So when the boa babies born , babies break through the membrane to crawl away . Pythons are oviparous , this means the eggs are surrounded by a thin , parchmentlike
shell . Female pythons will coil around their eggs and stay with them during the incubation period .

Life Span : Over 20 Years But Much More In Captivity .

Their Orginal Habitat : Africa , Asia and Australia , North America (A Little Amount) . All python snakes are tropical animals . They won't live under the temperature 22C (77F) . Under this fact the areas
that they live must be near the deserts or tropical places like amazon . But mainly you can find them Africa , Asia and Australia , North America (A Little Amount) .

Pythons As Pets : Pythons can be good pets if you care them enough .
-- Floyd

Re:Python (2)

BlowCat (216402) | more than 13 years ago | (#286036)

Life Span : Over 20 Years But Much More In Captivity
Wow, 20 years - it's pretty long for a programming language! I just hope that Guido will always keep it in captivity.

Re:why do Brits think Python is funny? (1)

wadetemp (217315) | more than 13 years ago | (#286037)

And the creators of South Park were INSPIRED by Python's cartoon style.

If you were stuck on a desert island... (2)

wadetemp (217315) | more than 13 years ago | (#286038)

... what book would you bring, what CD would you bring, and what language OTHER than Python would you be using (assuming that your computer suvives the sand and wet.)

Re:Conflict with GPL (1)

gunga (227260) | more than 13 years ago | (#286042)

You don't have to be "GPL nuts" to find this question interesting

Considering that Python's license is almost GPL-compatible, it would be interesting to know the reason why they chosed not to take the final step toward a fully GPL compatible license

I think there are to many license in open-source and free software. I'm sure there are situation when neither the GPL nor the BSD licences are good choices, but then you've got to make the reasons clear. You're not talking to lawyers but to hackers most of the time

Re:Did you approve of the Parrot joke? (1)

GTRacer (234395) | more than 13 years ago | (#286043)

Re: OS Language/App Names

Ever think maybe O'Reilly makes efforts to promote colorful names? Makes their job of choosing cover art for the SAGAN billions and billions /SAGAN books they produce that much easier!

- Any week now...

Power Systems (1)

GTRacer (234395) | more than 13 years ago | (#286044)

I've been thinking of power/actuation systems for a Battlebot for some time now. I'm leaning toward a compact spherical robot and was wondering - electric or hydraulic?

Oh, the other Rossum.

Uhhh... I don't really have a programming question, I haven't gotten that far with the 'bot yet. Sorry!

- Long live Asimov!

Re:Oy, it hurts (1)

MaxQuordlepleen (236397) | more than 13 years ago | (#286045)

yes that was/will be/has been/warll a problem.

Perl (1)

ConsumedByTV (243497) | more than 13 years ago | (#286047)

What are your thoughts on perl?

Do you see perl as a threat to python?

Or are is perl just another tool to get a job done like python?

Fight censors! (1)

RussP (247375) | more than 13 years ago | (#286048)

What went wrong at

Guido Hatzis (1)

noz (253073) | more than 13 years ago | (#286051)

Are you this man [] ? If not, are you in any way related to him, and could you please explain.

Hopefully this question covers the Australian fan niche.

Re:Why "None"? (1)

Phredward (254393) | more than 13 years ago | (#286052)

While I too wonder what Guido's motivations are, I'd say the answer to this question is probably, "it's a different type". None is usually one possible value of an option, where NULL refers to a null pointer (or possibly the value of a variable of type void, tho technically, i think, there is none).

For example, in SML (because I know it). an int option would have the possible values of NONE, or SOME (any int here).

and int ref (which is more or less a pointer to an int) would have possible values of (any int here) ref. NULL would be equivelent to an int ref option of value None. Whereas None is just, well, None.

Python evolution (1)

IanA (260196) | more than 13 years ago | (#286053)

Do you believe Python is a 'do-it-all' language currently?

If not do you believe it will ever get to that point in which it can be used for all purposes?

What needs to be improved for it to be a 'do-it-all' language?

Did you approve of the Parrot joke? (1)

typical geek (261980) | more than 13 years ago | (#286054)

Did you approve of the Parrot joke about combining Python and PERL?

I didn't especially like it, I think it hurts Open Source and reinforces the perception of Open Source software and funny and a toy.

I work for a large corporation, and it's an uphill battle to incorporate Open Source software. I'm tryin to move several web servers from IIS to Apache, but without my manager's blessing, it's hard. Jokes like PARROT make it harder for IT personell to make a case for Python or PERL being ready for corporate use.

I seriously think Open Source needs to rethink it's attitude if it wants to gain market share. IBM didn't became the monopolist it became in the 1970's by selling mainframes that made fart noises and having service reps wear joy buzzers, instead they had an image of an ultra serious, suit and tie wearing, dependable company. Now, I'm not advocating that kernel developers wear suits and tie for PR shots, or language developers don't chose more appropriate names (perhaps PYTH-96 instead of PYTHON?) but you have to admit such steps would give a lot more credibility to Open Source software.

Suitable for what in 5 years? (1)

sam_penrose (309818) | more than 13 years ago | (#286058)

Twenty years ago, many of the tasks that Python is used for currently had to be done in entirely in C because the hardware they ran on was so much slower. Now, Python is used in very computationally demanding applications (bioinformatics, high-end animation, and many more) as a glue for software written in C, et. al. With hardware speeds doubling every 18 months or so, five years from now, programmers will have 10 times as much computing power available to them. With the "performance issue" an order of magnitude less important, what applications do you think Python will be used for then that it might not be now?

Most needed contribution? (1)

sam_penrose (309818) | more than 13 years ago | (#286060)

If you could ask the Open Source community for one contribution to Python's continued development, what would it be?

Re:Structured Design. (1)

sam_penrose (309818) | more than 13 years ago | (#286061)

Your objection is that you find it harder to read without the braces, so others who find it easier to read without the braces should not talk about readability? Hhmm...

Re:What is *your* idea of Python and its future? (2)

sam_penrose (309818) | more than 13 years ago | (#286062)

Tim Peter's The Zen of Python [] , reads:

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Support? (1)

Tsar cr0bar (310803) | more than 13 years ago | (#286063)

When will Python support for JavaScript and HTML? I would like to use it and create PHP web pages for my Apache computer. Now it make use only for FrontPage plug-in?

Array slicing.. (1)

dmouritsendk (321667) | more than 13 years ago | (#286064)

Will Parrot maybe implement functions for array slicing? etc. array2@ = array@(1...3)(2..4) , that would be kinda cool .o)

efficient compilation and standardization (4)

janpod66 (323734) | more than 13 years ago | (#286065)

What are the plans for the compilation of Python code to efficient executables? Python's object system is very dynamic, allowing anybody to add instance variables and methods to any object at any time--how are you planning on dealing with that during compilation? Performance-wise, how do you expect Python will compare to compiled CommonLisp or Smalltalk, which evolved along similar lines 20 years ago? And will there be a language standard, or will Python continue to be defined by what the C implementation does?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?