LangTag.Region

Fields

None

Methods

compare (v2)

dump ()

get_better_tag ()

get_name ()

get_preferred_tag ()

get_tag ()

ref ()

unref ()

Details

class LangTag.Region

All the fields in the LangTag.Region structure are private to the LangTag.Region implementation.

compare(v2)
Parameters:

v2 (LangTag.Region) – a LangTag.Region.

Returns:

True if it’s the same, otherwise False.

Return type:

int

Compare if self and v2 is the same object or not.

dump()

Dumps the container information to the standard output.

get_better_tag()
Returns:

a tag string.

Return type:

str

Obtains the better tag for use. this is a convenient function to get the preferred-value if available.

get_name()
Returns:

a description string.

Return type:

str

Obtains the description of the subtag.

get_preferred_tag()
Returns:

a preferred-value for the tag or None.

Return type:

str

Obtains the preferred-value. this is available only when the tag is marked as deprecated.

get_tag()
Returns:

a tag string.

Return type:

str

Obtains the tag name.

ref()
Returns:

the same self object.

Return type:

LangTag.Region

Increases the reference count of self.

unref()

Decreases the reference count of self. when its reference count drops to 0, the object is finalized (i.e. its memory is freed).