179 """ |
179 """ |
180 clientCapabilities = DebugClientCapabilities.HasAll |
180 clientCapabilities = DebugClientCapabilities.HasAll |
181 |
181 |
182 # keep these in sync with VariablesViewer.VariableItem.Indicators |
182 # keep these in sync with VariablesViewer.VariableItem.Indicators |
183 Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING_M613__ |
183 Indicators = ("()", "[]", "{:}", "{}") # __IGNORE_WARNING_M613__ |
|
184 arrayTypes = { |
|
185 'list', 'tuple', 'dict', 'set', 'frozenset', "class 'dict_items'", |
|
186 "class 'dict_keys'", "class 'dict_values'" |
|
187 } |
184 |
188 |
185 def __init__(self): |
189 def __init__(self): |
186 """ |
190 """ |
187 Constructor |
191 Constructor |
188 """ |
192 """ |
1824 "array", "defaultdict") and |
1828 "array", "defaultdict") and |
1825 not isQt): |
1829 not isQt): |
1826 valtype = valtypestr |
1830 valtype = valtypestr |
1827 |
1831 |
1828 try: |
1832 try: |
1829 if valtype in ['list', 'tuple', 'dict', 'set', 'frozenset' |
1833 if valtype in self.arrayTypes: |
1830 ]: |
|
1831 rvalue = "{0:d}".format(len(value)) |
1834 rvalue = "{0:d}".format(len(value)) |
1832 elif valtype == 'array.array': |
1835 elif valtype == 'array.array': |
1833 rvalue = "{0:d}|{1}".format( |
1836 rvalue = "{0:d}|{1}".format( |
1834 len(value), value.typecode) |
1837 len(value), value.typecode) |
1835 elif valtype == 'collections.defaultdict': |
1838 elif valtype == 'collections.defaultdict': |