4.2.2. BaseGridPointContainer

class pyprom.lib.containers.base_gridpoint.BaseGridPointContainer(gridPointList)[source]

Base Grid Point Container. Storage and functions for pyprom.lib.locations.base_gridpoint.BaseGridPoint

__eq__(other)[source]

Determines if this object is equal to another.

Parameters

other (BaseGridPointContainer) – object to be compared against

Returns

equality

Return type

bool

Raises

TypeError if other not of BaseGridPointContainer

__getitem__(idx)[source]

Gives this BaseGridPointContainer container list like get capabilities

Parameters

idx (int) – index value

Returns

BaseGridPoint from self.point at idx

Return type

pyprom.lib.locations.base_gridpoint.BaseGridPoint

__hash__()[source]

Produces the hash representation of this object.

Returns

Hash representation of this object

Return type

str

__init__(gridPointList)[source]
Parameters

gridPointList (list(pyprom.lib.locations.base_gridpoint.BaseGridPoint)) – list of BaseGridPoints

__len__()[source]
Returns

number of items in self.points

Return type

int

__ne__(other)[source]

Determines if this object is not equal to another.

Parameters

other (BaseGridPointContainer) – object to be compared against

Returns

inequality

Return type

bool

Raises

TypeError if other not of BaseGridPointContainer

__repr__()[source]
Returns

String representation of this object

__setitem__(idx, gridPoint)[source]

Gives this BaseGridPointContainer list like set capabilities

Parameters
Raises

TypeError if gridPoint not of pyprom.lib.locations.base_gridpoint.BaseGridPoint

__str__()
Returns

String representation of this object

__unicode__()
Returns

String representation of this object

__weakref__

list of weak references to the object (if defined)

append(gridPoint)[source]

Append a BaseGridPoint to the container.

Parameters

gridPoint (pyprom.lib.locations.base_gridpoint.BaseGridPoint) – object to append to container.

Raises

TypeError if gridPoint not of pyprom.lib.locations.base_gridpoint.BaseGridPoint

index(gridPoint)[source]

Returns the index that this pyprom.lib.locations.base_gridpoint.BaseGridPoint or child object occurs. If none, return None

Parameters

gridPoint (pyprom.lib.locations.base_gridpoint.BaseGridPoint) – BaseGridPoint or child object to find index of

Returns

index in points list where this pyprom.lib.locations.base_gridpoint.BaseGridPoint resides.

Return type

int

sort(**kwargs)[source]

Sort points using kwargs passed in

Parameters

kwargs – common sort args