Here is a post where some scripting surprises are explained (like using () for collections) Scripts (Python): Getting up to speed with Python + sample script
You may want to avoid DOpus pseudo-types (like Map), however I am not sure whether dict or list would be accepted by DOpus in place of them (you would need to do a conversion anyway).