322a4fb58929a83b54c80417f555d2a2f32abf75,parser/python/nnef/printer.py,,format_argument,#Any#,32

Before Change


        return str(value)
    elif isinstance(value, (list, tuple)):
        string = "[" if isinstance(value, list) else "("
        for idx, item in enumerate(value):
            if idx != 0:
                string += ", "
            string += format_argument(item)
        string += "]" if isinstance(value, list) else ")"
        return string
    else:
        raise TypeError("arguments must be of type int, float, str, nnef.Identifier or list/tuple of such, found: " + str(type(value)))

After Change


    elif isinstance(value, (int, float)):
        return str(value)
    elif isinstance(value, list):
        return "[" + ", ".join(format_argument(item) for item in value) + "]"
    elif isinstance(value, tuple):
        return "(" + ", ".join(format_argument(item) for item in value) + ")"
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: KhronosGroup/NNEF-Tools
Commit Name: 322a4fb58929a83b54c80417f555d2a2f32abf75
Time: 2019-07-17
Author: viktor.gyenes@aimotive.com
File Name: parser/python/nnef/printer.py
Class Name:
Method Name: format_argument


Project Name: KhronosGroup/NNEF-Tools
Commit Name: 322a4fb58929a83b54c80417f555d2a2f32abf75
Time: 2019-07-17
Author: viktor.gyenes@aimotive.com
File Name: parser/python/nnef/printer.py
Class Name:
Method Name: format_result


Project Name: home-assistant/home-assistant
Commit Name: b09fe4a3a75e58187147f4dc10f86adb272be12c
Time: 2014-06-05
Author: Paulus@PaulusSchoutsen.nl
File Name: homeassistant/components/http/__init__.py
Class Name: RequestHandler
Method Name: _handle_get_root