eric6/DebugClients/Python/DebugVariables.py

changeset 7862
817ef8e0fa66
parent 7639
422fd05e9c91
child 7914
999f07b00a49
equal deleted inserted replaced
7861:3d48094ba8e1 7862:817ef8e0fa66
136 @return string representation of the given key 136 @return string representation of the given key
137 @rtype str 137 @rtype str
138 """ 138 """
139 if isinstance(key, str): 139 if isinstance(key, str):
140 key = repr(key) 140 key = repr(key)
141 # Special handling for Python2 unicode strings and bytes object 141 # Special handling for bytes object
142 # Raw and f-Strings are always converted to (unicode) str 142 # Raw and f-Strings are always converted to str
143 if key[0] in 'ub': 143 if key[0] == 'b':
144 key = key[1:] 144 key = key[1:]
145 145
146 return key # __IGNORE_WARNING_M834__ 146 return key # __IGNORE_WARNING_M834__
147 147
148 def getDictionary(self, var): 148 def getDictionary(self, var):
650 _TypeMap.append((long, None)) # __IGNORE_WARNING__ 650 _TypeMap.append((long, None)) # __IGNORE_WARNING__
651 except Exception: # secok 651 except Exception: # secok
652 pass # not available on all Python versions 652 pass # not available on all Python versions
653 653
654 try: 654 try:
655 _TypeMap.append((unicode, None)) # __IGNORE_WARNING__
656 except Exception: # secok
657 pass # not available on all Python versions
658
659 try:
660 import array 655 import array
661 _TypeMap.append((array.array, arrayResolver)) 656 _TypeMap.append((array.array, arrayResolver))
662 except ImportError: 657 except ImportError:
663 pass # array.array may not be available 658 pass # array.array may not be available
664 659

eric ide

mercurial