Next / Previous / Contents / Shipman's homepage

9.3. Class Rank: One taxonomic rank

An object of this class represents one of the taxonomic ranks or levels such as order, family, genus, and so on.

Attributes of a Rank object include:

.code

The short code for this rank; see Section 5.1, “The ranks file” for a discussion of rank codes.

.depth

Depth of the rank within the hierarchy: 0 for the root rank, 1 for the next deeper rank, and so on. This value is also the index of the rank within the containing Hier object. For example, if you have a Hier object h, h[n] will have a .depth attribute of n.

.hier

The containing Hier object.

.isOptional

True if this rank is not required. For example, some bird families are divided into subfamilies but some are not, so the subfamily rank object will have this attribute set to 1.

.keyLen

The number of digits in the taxonomic key for this rank.

.name

The name of the rank, e.g., "Genus".