minimal pythonic revision