# ``igraph`.`Configuration`.`Types``

class documentation

`class Types: (source)`

View In Hierarchy

Static class for the implementation of custom getter/setter functions for configuration keys

Static Method | `setboolean` | Sets a boolean value in the given configuration object.
Static Method | `setfloat` | Sets a float value in the given configuration object.
Static Method | `setint` | Sets an integer value in the given configuration object.

@staticmethod
def setboolean(obj, section, key, value): (source)

Sets a boolean value in the given configuration object.

Parameters
obj | a configuration object
section | the section of the value to be set
key | the key of the value to be set
value | the value itself. `0`, `false`, `no` and `off` means false, `1`, `true`, `yes` and `on` means true, everything else results in a `ValueError` being thrown. Values are case-insensitive

@staticmethod
def setfloat(obj, section, key, value): (source)

Sets a float value in the given configuration object.

Note that float values are converted to strings in the configuration object, which may lead to some precision loss.

Parameters
obj | a configuration object
section | the section of the value to be set
key | the key of the value to be set
value | the value itself.

@staticmethod
def setint(obj, section, key, value): (source)

Sets an integer value in the given configuration object.

Parameters
obj | a configuration object
section | the section of the value to be set
key | the key of the value to be set
value | the value itself.