Package mrv :: Module conf :: Class BasicSet
[hide private]
[frames] | no frames]

Class BasicSet

source code

object --+    
         |    
       set --+
             |
            BasicSet

Set with ability to return the key which matches the requested one

This functionality is the built-in in default STL sets, and I do not understand why it is not provided here ! Of course I want to define custom objects with overridden hash functions, put them into a set, and finally retrieve the same object again !


Note: indexing a set is not the fastest because the matching key has to be searched. Good news is that the actual 'is k in set' question can be answered quickly

Instance Methods [hide private]
 
__getitem__(self, item) source code

Inherited from set: __and__, __cmp__, __contains__, __eq__, __ge__, __getattribute__, __gt__, __iand__, __init__, __ior__, __isub__, __iter__, __ixor__, __le__, __len__, __lt__, __ne__, __new__, __or__, __rand__, __reduce__, __repr__, __ror__, __rsub__, __rxor__, __sizeof__, __sub__, __xor__, add, clear, copy, difference, difference_update, discard, intersection, intersection_update, isdisjoint, issubset, issuperset, pop, remove, symmetric_difference, symmetric_difference_update, union, update

Inherited from object: __delattr__, __format__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from set: __hash__

Properties [hide private]

Inherited from object: __class__