| Home | Trees | Indices | Help | 
        
  | 
  
|---|
| 
       | 
  
Subset of selected MathSet, or other Iterable.
Prior to adding new elements, it checks that they are in its superset.
>>> superset = [1, 2] >>> s = SubSet(superset) >>> s |= [1, 2] >>> print(s) SubSet([[1, 2]]) >>> s.add(3) raises exception because 3 \notin [1,2]
| Instance Methods | |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
      
  | 
  |||
| 
     Inherited from  Inherited from   | 
  |||
| Properties | |
| superset | |
| 
     Inherited from   | 
  |
| Method Details | 
  
 Define the superset of this set. 
  | 
  
 repr(x) 
  | 
  
 Add state to subset. Extends MathSet.add with subset relation checking. Example
 See Also
  | 
  
 Add multiple new elements to subset. Extends MathSet.add_from with subset relation checking. NoteIt would be sufficient to extend only .add provided MathSet.add_from called .add iteratively. However MathSet.add_from filters states, which is arguably more efficient. So both .add and .add_from need to be extended here. See Also
  | 
| Property Details | 
  superset
  | 
| Home | Trees | Indices | Help | 
        
  | 
  
|---|
| Generated by Epydoc 3.0.1 on Sat Nov 19 00:11:17 2016 | http://epydoc.sourceforge.net |