Handle curly braces in python expressions.

This fixes #29