typedef float real; => NameError: name ‘real’ is not defined %pythoncode %{ real = float %} => it works!