Python: Fix argument processing