element¶
This module contains the Element class used to encapsulate an element to be ranked. An element is defined as an int or a string.
- class corankco.element.Element(value: int | str | Element)¶
A class to represent an element of a ranking.
- Parameters:
value (Union[int, str]) – the value of the element, either an integer or a string
- can_be_int()¶
- Returns:
True iif the value of Element object is an int or a str that can be converted to int
- property type: Type¶
returns the type of the instance :return: type of the instance :rtype: Type
- property value: int | str¶
returns the value of the instance :return: value of the instance :rtype: Union[int, str]