Ask Your Question

Revision history [back]

This is not really an answer, but adding that on the top of my module helps :

class WrapperStr(object):
    def __init__(self,fun):
        self.fun=fun
    def __call__(self,arg):
        return self.fun(str(arg))

var=WrapperStr(var)

I just have to replace var('x') by x=var('x') and it works at least better than before.

However, this seems not satisfactory and I'm expecting many "border effects" ...