def translate_dict ( cls , val ) : escaped = ', ' . join ( [ "{} -> {}" . format ( cls . translate_str ( k ) , cls . translate ( v ) ) for k , v in val . items ( ) ] ) return 'Map({})' . format ( escaped )
casting map to string python
Translate dicts to scala Maps
def translate_dict(cls, val):
        """Translate dicts to scala Maps"""
        escaped = ', '.join(
            ["{} -> {}".format(cls.translate_str(k), cls.translate(v)) for k, v in val.items()]
        )
        return 'Map({})'.format(escaped)