Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Module « builtins »

Classe « set »

Informations générales

Héritage

builtins.object
    builtins.set

Définition

class set(builtins.object):

Description [extrait de set.__doc__]

set() -> new empty set object
set(iterable) -> new set object

Build an unordered collection of unique elements.

Constructeur(s)

Signature du constructeur Description
__new__(*args, **kwargs) Create and return a new object. See help(type) for accurate signature. [extrait de __new__.__doc__]
__init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature. [extrait de __init__.__doc__]

Liste des opérateurs

Signature de l'opérateur Description
__and__(self, value) Return self&value. [extrait de __and__.__doc__]
__contains__ x.__contains__(y) <==> y in x. [extrait de __contains__.__doc__]
__eq__(self, value) Return self==value. [extrait de __eq__.__doc__]
__ge__(self, value) Return self>=value. [extrait de __ge__.__doc__]
__gt__(self, value) Return self>value. [extrait de __gt__.__doc__]
__iand__(self, value) Return self&=value. [extrait de __iand__.__doc__]
__ior__(self, value) Return self|=value. [extrait de __ior__.__doc__]
__isub__(self, value) Return self-=value. [extrait de __isub__.__doc__]
__ixor__(self, value) Return self^=value. [extrait de __ixor__.__doc__]
__le__(self, value) Return self<=value. [extrait de __le__.__doc__]
__lt__(self, value) Return self<value. [extrait de __lt__.__doc__]
__ne__(self, value) Return self!=value. [extrait de __ne__.__doc__]
__or__(self, value) Return self|value. [extrait de __or__.__doc__]
__rand__(self, value) Return value&self. [extrait de __rand__.__doc__]
__ror__(self, value) Return value|self. [extrait de __ror__.__doc__]
__rsub__(self, value) Return value-self. [extrait de __rsub__.__doc__]
__rxor__(self, value) Return value^self. [extrait de __rxor__.__doc__]
__sub__(self, value) Return self-value. [extrait de __sub__.__doc__]
__xor__(self, value) Return self^value. [extrait de __xor__.__doc__]

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__getattribute__(self, name) Return getattr(self, name). [extrait de __getattribute__.__doc__]
__iter__(self) Implement iter(self). [extrait de __iter__.__doc__]
__len__(self) Return len(self). [extrait de __len__.__doc__]
__reduce__ Return state information for pickling. [extrait de __reduce__.__doc__]
__repr__(self) Return repr(self). [extrait de __repr__.__doc__]
__sizeof__ S.__sizeof__() -> size of S in memory, in bytes [extrait de __sizeof__.__doc__]
add Add an element to a set. [extrait de add.__doc__]
clear Remove all elements from this set. [extrait de clear.__doc__]
copy Return a shallow copy of a set. [extrait de copy.__doc__]
difference Return the difference of two or more sets as a new set. [extrait de difference.__doc__]
difference_update Remove all elements of another set from this set. [extrait de difference_update.__doc__]
discard Remove an element from a set if it is a member. [extrait de discard.__doc__]
intersection Return the intersection of two sets as a new set. [extrait de intersection.__doc__]
intersection_update Update a set with the intersection of itself and another. [extrait de intersection_update.__doc__]
isdisjoint Return True if two sets have a null intersection. [extrait de isdisjoint.__doc__]
issubset Report whether another set contains this set. [extrait de issubset.__doc__]
issuperset Report whether this set contains another set. [extrait de issuperset.__doc__]
pop Remove and return an arbitrary set element. [extrait de pop.__doc__]
remove Remove an element from a set; it must be a member. [extrait de remove.__doc__]
symmetric_difference Return the symmetric difference of two sets as a new set. [extrait de symmetric_difference.__doc__]
symmetric_difference_update Update a set with the symmetric difference of itself and another. [extrait de symmetric_difference_update.__doc__]
union Return the union of sets as a new set. [extrait de union.__doc__]
update Update a set with the union of itself and others. [extrait de update.__doc__]

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __hash__, __init_subclass__, __reduce_ex__, __setattr__, __str__, __subclasshook__