_Configuration.getTyped
- _Configuration.getTyped(section, option)
Give the value associated to section.option, converted according to the type declared in defaults:
intandfloatare converted,boolgives a Python bool, enumerations andstrstay strings. Preferably use thetypedaccessor: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