Python syntax tweaks