Checking in on Python

Guido Van Rossum on the state of Python and the two services that are helping to push it forward.

Guido van Rossum is the creator of Python. I recently had the opportunity to talk with him about the state of the language.

You probably don’t realize it, but Python’s capabilities are pushed every time you use YouTube and Dropbox. During our interview, Van Rossum said both of these services are at the forefront of Python’s development.

“Whenever someone clicks on a [YouTube] video, they will see HTML that was generated from Python,” he said. “That’s definitely pushing the limits.” [Discussed 27 seconds in — you can see the scalability presentation that Van Rossum mentions during this segment here.]

On the Dropbox side, Van Rossum said the service’s clients for Linux, Windows and Mac are all implemented in Python. You’re also downloading a miniature version of the Python runtime when you’re using Dropbox. [Noted at 1:20.]

Van Rossum also spoke about the lengthy transition Python has undergone from Python 2 to Python 3. “If you want improvements to your Python … now is the time to start trying out Python 3.” Why? While the changes to the language are actually quite small, with the exception of unicode handling being completely overhauled, Python 3 is a better, faster version of Python. In addition, many third parties like Django are coming on line with libraries and frameworks for Python 3. [Discussed at the 7:01 mark.]

Additional topics discussed during the interview include:

You can view the full discussion in the following video.

Related:

tags: , , ,

Get the O’Reilly Programming Newsletter

Weekly insight from industry insiders. Plus exclusive content and offers.

  • http://www.dancingbison.com/ Vasudev Ram

    I’ve been reading about that G+ post by Guido on Python perf tips for the last few days on the Net but it keeps giving me a “This post could not be found.” error. Anyone know the title of the post so I can search for it in Google’s cache?

    Thanks,
    Vasudev Ram

    • http://twitter.com/nwerneck nic

      That link is just right… Here’s the text.

      “””
      Some patterns for fast Python. Know any others?

      – Avoid overengineering datastructures. Tuples are better than objects (try namedtuple too though). Prefer simple fields over getter/setter functions.

      – Built-in datatypes are your friends. Use more numbers, strings, tuples, lists, sets, dicts. Also check out the collections library, esp. deque.

      – Be suspicious of function/method calls; creating a stack frame is expensive.

      – Don’t write Java (or C++, or Javascript, …) in Python.

      – Are you sure it’s too slow? Profile before optimizing!

      – The universal speed-up is rewriting small bits of code in C. Do this only when all else fails.
      “””

      • http://www.dancingbison.com vasudevram

        Thank you!

        Good tips. All of them make sense. The only one I am a bit surprised about is the point about function/method calls. But then, I understand that Python will have more overhead than a language like C, in which, IIRC, function calls are supposed to have quite low overhead, from the time of K&R. Of course, I’m not a language designer. Just commenting as a language user.