pycocoa.sets.Set

Package pycocoa :: Module sets :: Class Set |
[frames] | no frames]

# Class Set

      object --+
               |
             set --+
                   |
      object --+   |
               |   |
    bases._Type0 --+
                   |
                  Set

Python `set` Type, wrapping an ObjC `NSMutableSet`.

Instance Methods
new empty set object |
__init__(self, ns_set=[]) New Set from a `frozenset`, `list`, `set`, `tuple`, FrozenSet, Set or `NSMutableSet`. |
__iand__(self, elem) x&=y |
__ior__(self, elem) x|=y |
__isub__(self, elem) x-=y |
__ixor__(self, elem) x^=y |
add(self, elem) Like `set.add`. |
clear(self) Like `set.clear`. |
difference_update(self, *others) Like `set.difference_update`. |
discard(self, elems) Like `set.discard`. |
intersection_update(self, *others) Like `set.intersection_update`. |
pop(self) Like `set.pop`. |
remove(self, elems) Like `set.remove`. |
symmetric_difference_update(self, other) Like `set.symmetric_difference_update`. |
update(self, *others) Like `set.update`. |
copy(self) Make a copy of this set. |
Inherited from `set`: `__and__`, `__cmp__`, `__contains__`, `__eq__`, `__ge__`, `__getattribute__`, `__gt__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__ne__`, `__or__`, `__rand__`, `__reduce__`, `__repr__`, `__ror__`, `__rsub__`, `__rxor__`, `__sizeof__`, `__sub__`, `__xor__`, `difference`, `intersection`, `isdisjoint`, `issubset`, `issuperset`, `symmetric_difference`, `union` Inherited from `bases._Type0`: `__str__`, `type2strepr` Inherited from `object`: `__delattr__`, `__format__`, `__reduce_ex__`, `__setattr__`, `__subclasshook__`

Static Methods
a new object with type S, a subtype of T |
__new__(cls, ns_set=`[``]`) New Set from a `frozenset`, `list`, `set`, `tuple`, Set or `NSMutableSet`. |

Class Variables
Inherited from `set`: `__hash__`

Properties
| NS Get the ObjC instance (`NSMutableSet`).
Inherited from `bases._Type0`: `NSDelegate` Inherited from `object`: `__class__`

Method Details

### __init__(self, ns_set=[]) (Constructor) |
New Set from a `frozenset`, `list`, `set`, `tuple`, FrozenSet, Set or `NSMutableSet`. Returns: new empty set object Overrides: object.__init__

### __iand__(self, elem) |
x&=y Overrides: set.__iand__ (inherited documentation)

### __ior__(self, elem) |
x|=y Overrides: set.__ior__ (inherited documentation)

### __isub__(self, elem) |
x-=y Overrides: set.__isub__ (inherited documentation)

### __ixor__(self, elem) |
x^=y Overrides: set.__ixor__ (inherited documentation)

### add(self, elem) |
Like `set.add`. Overrides: set.add

### clear(self) |
Like `set.clear`. Overrides: set.clear

### difference_update(self, *others) |
Like `set.difference_update`. Overrides: set.difference_update

### discard(self, elems) |
Like `set.discard`. Overrides: set.discard

### intersection_update(self, *others) |
Like `set.intersection_update`. Overrides: set.intersection_update

### pop(self) |
Like `set.pop`. Overrides: set.pop

### remove(self, elems) |
Like `set.remove`. Overrides: set.remove

### symmetric_difference_update(self, other) |
Like `set.symmetric_difference_update`. Overrides: set.symmetric_difference_update

### update(self, *others) |
Like `set.update`. Overrides: set.update

### __new__(cls, ns_set=`[``]`) Static Method |
New Set from a `frozenset`, `list`, `set`, `tuple`, Set or `NSMutableSet`. Returns: a new object with type S, a subtype of T Overrides: object.__new__

### copy(self) |
Make a copy of this set. Returns: The copy (Set). Overrides: set.copy

Property Details

### NS Get the ObjC instance (`NSMutableSet`). Get Method: NS(self) - Get the ObjC instance (`NSMutableSet`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.