eric6/DebugClients/Python/DebugVariables.py

changeset 7332
49076c600903
parent 7250
d8bdc55aee1a
child 7360
9190402e4505
equal deleted inserted replaced
7331:1fb70d1f8a39 7332:49076c600903
412 @return dictionary containing the variable attributes 412 @return dictionary containing the variable attributes
413 @rtype dict 413 @rtype dict
414 """ 414 """
415 d = {} 415 d = {}
416 start = count = 0 416 start = count = 0
417 allItems = var.tolist() 417 try:
418 len(var) # Check if it's an unsized object, e.g. np.ndarray(())
419 allItems = var.tolist()
420 except TypeError: # TypeError: len() of unsized object
421 allItems = []
418 422
419 for idx, value in enumerate(allItems): 423 for idx, value in enumerate(allItems):
420 d[str(idx)] = value 424 d[str(idx)] = value
421 count += 1 425 count += 1
422 if count >= BatchSize: 426 if count >= BatchSize:

eric ide

mercurial