interpreter.py: minor refactoring