HomogeneousList

class astropy.utils.collections.HomogeneousList(types, values=[])[source]

Bases: list

A subclass of list that contains only elements of a given type or types. If an item that is not of the specified type is added to the list, a TypeError is raised.

Parameters:
typespython:sequence of types

The types to accept.

valuespython:sequence, optional

An initial set of values.

Methods Summary

append(x)

Append object to the end of the list.

extend(x)

Extend list by appending elements from the iterable.

insert(i, x)

Insert object before index.

Methods Documentation

append(x)[source]

Append object to the end of the list.

extend(x)[source]

Extend list by appending elements from the iterable.

insert(i, x)[source]

Insert object before index.