Interviews: Q&A With Guido van Rossum
Guido van Rossum is best known as the creator of Python, and he remains the BDFL (Benevolent Dictator For Life) in the community. The recipient of many awards for his work, and author of numerous books, he left Google in December and started working for Dropbox early this year. A lot has happened in the 12 years since we talked to Guido and he's agreed to answer your questions. As usual, ask as many as you'd like, but please, one question per post.
Hi,
What prompted the move from Google to Dropbox? What did you do at Google, and what are you going to do at Dropbox?
When will you remove the GIL?
Does the NSA have access to our Dropbox contents, as is apparently the case with Microsoft Skydrive?
Do you regret the swath of backwards incompatible changes in version 3 that have lead to such slow uptake, or do you feel it was the best move for the language moving forward?
paul reinheimer
Guido
When you interviewed at Google - did they ask you brainteaser or hard algorithmic questions, and if so, what did you think of it?
Cheers!
grisha.org
Python does support threading. The issue is that CPython implementation has the GIL to contend with. IronPython did away with the GIL, but it's no longer being maintained. Also, http://interviews.slashdot.org/comments.pl?sid=4105821&cid=44608065 beat you too it.
Interfaces, abstract classes, private members, etc... Why did python avoid all this?
I'm god, but it's a bit of a drag really...
One of the most common complaints about Python is the limitations of its lambdas, namely being one line only without the ability to do assignments. Obviously, Python's whitespace treatment is a major part of that (and, IIRC, I've read comments from you to that effect). I've spent quite a bit of time thinking about possible syntax for a multi-line lambda, and the best I've come up with is trying to shoehorn some unused (or little used) symbol into a C-style curly brace, but that's messy at best. Is there a better way, and do you see this functionality ever being added?
if you want to joke about indentation:
at least make it syntactically sound
while you're at it:
follow pep8
`echo $[0x853204FA81]|tr 0-9 ionbsdeaml`@gmail.com
Compound question here: what part of Python is or became your favorite, and what's the worst thing, something that you would change if you knew now what you did then?
If you could go back to the very start and change one thing about Python, what would it be and why?
Do you see PyPy as the future ? http://pypy.org/
Or do you remain unconvinced, and -- if so -- why ?
Over the years, there have been several attempts to create a sandboxed version of python that will safely run in a web browser.
Mostly this was because of problems with Javascript.
Now that Javascript works -- and we have nice things like CoffeeScript -- is it time to give up on python in the browser ?
What is your view on the tone that Linus uses on the LKML? Do you think it actually provides any benefits or just drives away would-be contributors?
The main thing that keeps Python from being really useful for my projects is the Global Interpreter Lock (GIL). I would love to write Python for my data-intensive code, but it is impossible to get really good parallelism with Python; the multiprocessing library isn't a magic fix because then I have to move all my data back and forth between processes.
When, if ever, should I expect to be able to use Python to do parallel data processing? What is the priority for this, and what would need to be done to make thread-level parallelism possible?
If you could go back in time, what, if anything, would you do differently WRT to developing and releasing Python 3?
-73, de n1ywb
www.n1ywb.com
Have the prospects of Python in any way improved since you grew a beard? To what degree does language success correlate to beard length?
I am officially gone from
Are you aware of any attempts by the NSA to add a backdoor in Python ? ;)
Of course, if you did get an NSA letter, you wouldn''t be allowed to say.
You are welcome to NOT ANSWER this question.
We will take note of that
Some people claim that Python is, at least partly, a functional language. You disagree, as do I. Simply having a few map and filter type functions does not make for a functional language. As I understand it those functions were added to the libraries by a homesick Lisper, and that several times you've been tempted to eliminate them. In general it seems you're not a fan of functional programming, at least for Python.
Question: do you feel that the functional programming approach is not very useful in general, or simply that it's not appropriate for Python? It would be nice to hear your reasons either way.
What are the big features/improvements of python 3 that could/should convince me to make the effort to switch over from python 2.x to python 3.x?
I am not able to do the switch now as I rely on some libraries that have not finished converting to python 3 yet, but having something to look forward to other than the pain of backwards-incompatibility could go a long way in getting me to prepare for the change instead of ignoring the issue.
I've commented on python and whitespace enough times, that it became more practical to create a small web page about it: Read it here.
Tools like ipython and fabric go a long way into making python into something that can replace my bash shell in many situations.
The main obstacle to this use-case is python's semantic spacing and lack of braces (or something):
- it is hard to do even a fairly simple if/else or loop in a single line so it will interact nicely with the terminal's history
- it is hard to cut&paste code into the terminal because you have to be wary of leading spaces
Ipython tries to solve some of this with shortcuts to bring up a built-in editor, which is an approach that works but is quite cumbersome.
Do you think convenient usage on the interactive shell is a worthy goal that the language should support? if so, is there any direction the language or libraries could develop to better support it?
Guido, if you were to design Python from scratch now (without any constraint and legacy code using the old Python), what would you change and how different would it be from Python 3?
How often do you get a chance to write serious code ?
What's your default OS ?
Command shell ?
Version control ?
Editor ?
IDE ?
Web browser ?
IM client ?
email client ?
late nights or early rise ?
How do you feel about the current state of the migration to Python 3 (Py3k)?
From a user perspective it seems that the conversion of popular libraries has lagged far behind, which has impeded the transition. In my professional capacity, nearly every single system I use lacks an installed 3.x interpreter. In fact, 2.7 is a rarity. I'd like to get your thoughts.
"Here Lies Philip J. Fry, named for his uncle, to carry on his spirit"
Eh, I can give or take the lambdas. Just give me a halfway decent switch-case statement so I don't have to write huge, rolling if-elif-elif-elif-elif-elif-else-finally blobs. Using built in language reflection to parse a parameter into a function name you call later isn't an answer and has led to many, many python scripts crapping out on me when you actually want to use string data containing '-' or other strange, exotic ASCII characters in them as your key into the switch statement.
I've commented on python and whitespace enough times, that it became more practical to create a small web page about it: Read it here.
Much as I love python, I see nothing to refute my objections to python's use of semantic spaces and lack of braces or other equivalent construct.
- It makes python ineffective as a shell-replacement language, because you can't easily do a complex one-liner and then retrieve it from history
- It makes cutting and pasting code difficult, which makes refactoring unnecessarily painful
- It makes it impossible to fully auto-format code: all formatters I have seen for python do not trust themselves to touch leading spaces, nor should they. This leads to ugly, inconsistent-looking code.
It's not just about the obvious problem of tripping up anyone who is not paying attention to this peculiarity of the language. If python had semantic line ends (but not semantic leading spaces) with optional semi-colons (for when you don't use a line end) plus braces, the amount of extra typing and visual clutter would be minimal, while these problems would go away, making python a more useful language.
GIL stands for Global Interpreter Lock, see: https://en.wikipedia.org/wiki/Global_Interpreter_Lock
Nae king! Nae laird! Nae yurrupiean pressedent! We willna be fooled again!