_Configuration.getTyped

_Configuration.getTyped(section, option)

Give the value associated to section.option, converted according to the type declared in defaults: int and float are converted, bool gives a Python bool, enumerations and str stay strings. Preferably use the typed accessor: config.typed[section, option].

Parameters:
  • section (str) – The section.

  • option (str) – The property.

Returns:

The value, converted according to the declared type.

Return type:

int | float | bool | str

Example

import pyagrum as gum

gum.config.getTyped("tensor", "visibleDigits")  # same as gum.config.typed["tensor", "visibleDigits"]
# 4
gum.config.getTyped("tensor", "withColors")
# True

Class

_Configuration