1. My Emacs setup

    Some notes on my emacs setup. Maybe this should go in README for my dotemacs.


    Which mode?

    There is python-mode.el, and python.el. I have settled on python-mode from the elpa repositories.


    I tried ropemacs, and really like it when it works. For simple refactorings it can …

  2. Python One-Liners: Generator expressions

    Here's a typical loop that checks for some condition and breaks the first time it passes:

        def list_contains_urls(maybe_urls):
            for url in maybe_urls:
                 if url.startswith('http'):
                      return True
            return False

    Can we do that more concisely? Sure.

        def list_contains_urls(maybe_urls):
             return any(u for u in maybe_urls if u …
    Tagged as : programming python

Page 2 / 4