Other articles


  1. Python 1.0

    This morning, I decided to try to install Python 1.0. I wanted to get a glimpse of where the language came from, how it's grown, and what it was like in its early days. I figured an earlier version would probably be a little simpler, and perhaps the ...

    read more

    There are comments.

  2. Notes on the descriptor Protocol

    I just figured out how the descriptor protocol works. It is not the most intuitive part of python, but it allows for some cool constructions. Just as a way of writing down what I've learned so I remember it. Say you have a class that you're trying to ...

    read more

    There are comments.

  3. DjangoCon EU Talk Proposal

    I just submitted a talk proposal to DjangoConEU. This is a conference being held in Warsaw. The talk is on making django tests faster and more effective. The goal is to give attendees a bag of simple, effective tricks for speeding up their test suites and, in the process, their ...

    read more

    There are comments.

  4. Don't waste your iterators!

    There's a pattern I see fairly often in code where someone uses a function that returns a sequence of some sort, filters it, and then wants to use the first result that matches the filter. It looks something like this:

    return [x for x in foo if len(x ...
    read more

    There are comments.

  5. Iterators and iterables clarified

    Note

    Need to fix code formatting

    So what exactly is a python iterator, and how is that different from an iterable?

    An iterable is an object that implements a method __iter__(), which, when called, returns an iterator. The __iter__() method can be called by the iter() function, and is also ...

    read more

    There are comments.

  6. Page 1 / 1