Package fuzz :: Module iset :: Class IndexedMember
[hide private]
[frames] | no frames]

Class IndexedMember

source code

object --+
         |
        IndexedMember
Known Subclasses:

Indexed member class. This is a special type of object which has mutable properties but a special immutable property (called the index) which is used for hashing and equality, allowing it to be stored in a set or to be used as a dict key.

Instance Methods [hide private]
 
__init__(self, index)
Constructor.
source code
str
__repr__(self)
Return the canonical string representation of the index.
source code
str
__str__(self)
Return the string representation of the index.
source code
int
__hash__(self)
Return a hash of the index object.
source code
bool
__eq__(self, other)
Return whether the index objects match.
source code
bool
__ne__(self, other)
Return whether the index objects do not match.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
object index
Return the index object.

Inherited from object: __class__

Method Details [hide private]

__init__(self, index)
(Constructor)

source code 

Constructor.

Parameters:
  • index (object) - The index object (immutable).
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return the canonical string representation of the index.

Returns: str
Canonical string representation.
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Return the string representation of the index.

Returns: str
String representation.
Overrides: object.__str__

__hash__(self)
(Hashing function)

source code 

Return a hash of the index object.

Returns: int
The index hash.
Overrides: object.__hash__

__eq__(self, other)
(Equality operator)

source code 

Return whether the index objects match.

Returns: bool
True if equal, false otherwise.

__ne__(self, other)

source code 

Return whether the index objects do not match.

Returns: bool
True if not equal, false otherwise.

Property Details [hide private]

index

Return the index object.

Get Method:
unreachable.index(self) - Return the index object.
Type:
object