class documentation

class GenderedLanguage(NamedTuple): (source)

View In Hierarchy

A combination of Language and Gender.

This type is needed for various file formats, where the Language and Gender types are combined into a single integer.

Class Method from_id Create a new GenderedLanguage instance from a combined ID.
Method to_id Convert the Language instance to a combined ID.
Class Variable gender Undocumented
Class Variable lang Undocumented
@classmethod
def from_id(cls, combined_id: int): (source)

Create a new GenderedLanguage instance from a combined ID.

Parameters
combined_id:intThe combined ID, which is 2 times the Language ID plus the Gender.
Returns
A new GenderedLanguage instance.
def to_id(self) -> int: (source)

Convert the Language instance to a combined ID.

Returns
intThe combined ID, which is 2 times the Language ID plus the Gender.

Undocumented

Undocumented