Package pology :: Module monitored :: Class Monpair

type Monpair

object --+    
         |    
 Monitored --+
             |
            Monpair

Monitored pair (counterpart to two-element tuple).

Instance Methods
 
__init__(self, init=None)
Create a pair with two elements.
 
__repr__(self)
 
__str__(self)
 
__len__(self)
 
__iter__(self)
 
__getitem__(self, i)

Inherited from Monitored: __eq__, __getattr__, __ne__, __setattr__, assert_spec_getattr, assert_spec_getitem, assert_spec_init, assert_spec_setattr, assert_spec_setitem, data

Instance Variables
  first
the first element of the pair
  second
the second element of the pair
Method Details

__init__(self, init=None)
(Constructor)

 

Create a pair with two elements.

All methods behave as their namesakes in standard tuple.

Parameters:
  • init - 2-element sequence or another pair
  • init - tuple, list,... or Monpair
Overrides: object.__init__

__repr__(self)
(Representation operator)

 
Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

 
Overrides: object.__str__
(inherited documentation)