# eric6.DebugClients.Python.DebugVariables

Module implementing classes and functions to dump variable contents.

### Global Attributes

_TypeMap
arrayResolver
defaultResolver
dictResolver
dictViewResolver
listResolver
multiValueDictResolver
ndarrayResolver
setResolver

### Classes

ArrayResolver | Class used to resolve from array.array including some meta data.
BaseResolver | Base class of the resolver class tree.
DefaultResolver | Class used to resolve the default way.
DictResolver | Class used to resolve from a dictionary.
DictViewResolver | Class used to resolve from dict views.
ListResolver | Class used to resolve from a tuple or list.
MultiValueDictResolver | Class used to resolve from Django multi value dictionaries.
NdArrayResolver | Class used to resolve from numpy ndarray including some meta data.
SetResolver | Class used to resolve from a set or frozenset.

### Functions

_initTypeMap | Protected function to initialize the type map.
getType | Public method to get the type information for an object.

## ArrayResolver

Class used to resolve from array.array including some meta data.

### Derived from

BaseResolver

### Class Attributes

TypeCodeMap

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### ArrayResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### ArrayResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (tuple or list)
  variable to extract an attribute or value from
attribute (str)
  id of the value to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## BaseResolver

Base class of the resolver class tree.

### Derived from

object

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### BaseResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### BaseResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (any)
  variable to extract an attribute or value from
attribute (str)
  name of the attribute to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## DefaultResolver

Class used to resolve the default way.

### Derived from

BaseResolver

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.

### Static Methods

None

#### DefaultResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

Up

## DictResolver

Class used to resolve from a dictionary.

### Derived from

BaseResolver

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
keyToStr | Public method to get a string representation for a key.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### DictResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### DictResolver.keyToStr

keyToStr(key)

Public method to get a string representation for a key.

key (any)
  key to be converted

Returns:
  string representation of the given key

Return Type:
  str

#### DictResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (dict)
  variable to extract an attribute or value from
attribute (str)
  name of the attribute to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## DictViewResolver

Class used to resolve from dict views.

### Derived from

ListResolver

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### DictViewResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### DictViewResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (tuple or list)
  variable to extract an attribute or value from
attribute (str)
  id of the value to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## ListResolver

Class used to resolve from a tuple or list.

### Derived from

BaseResolver

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### ListResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### ListResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (tuple or list)
  variable to extract an attribute or value from
attribute (str)
  name of the attribute to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## MultiValueDictResolver

Class used to resolve from Django multi value dictionaries.

### Derived from

DictResolver

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### MultiValueDictResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### MultiValueDictResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (dict)
  variable to extract an attribute or value from
attribute (str)
  name of the attribute to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## NdArrayResolver

Class used to resolve from numpy ndarray including some meta data.

### Derived from

BaseResolver

### Class Attributes

None

### Class Methods

None

### Methods

__isNumeric | Private method to check, if an array is of a numeric type.
getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### NdArrayResolver.__isNumeric

__isNumeric(arr)

Private method to check, if an array is of a numeric type.

arr (ndarray)
  array to check

Returns:
  flag indicating a numeric array

Return Type:
  bool

#### NdArrayResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### NdArrayResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (tuple or list)
  variable to extract an attribute or value from
attribute (str)
  id of the value to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## SetResolver

Class used to resolve from a set or frozenset.

### Derived from

BaseResolver

### Class Attributes

None

### Class Methods

None

### Methods

getDictionary | Public method to get the attributes of a variable as a dictionary.
resolve | Public method to get an attribute from a variable.

### Static Methods

None

#### SetResolver.getDictionary

getDictionary(var)

Public method to get the attributes of a variable as a dictionary.

var (any)
  variable to be converted

Returns:
  dictionary containing the variable attributes

Return Type:
  dict

#### SetResolver.resolve

resolve(var, attribute)

Public method to get an attribute from a variable.

var (tuple or list)
  variable to extract an attribute or value from
attribute (str)
  id of the value to extract

Returns:
  value of the attribute

Return Type:
  any

Up

## _initTypeMap

_initTypeMap()

Protected function to initialize the type map.

Up

## getType

getType(obj)

Public method to get the type information for an object.

obj (any)
  object to get type information for

Returns:
  tuple containing the type name, type string and resolver

Return Type:
  tuple of str, str, BaseResolver

Up