set.intersection help suggests 2 sets, while any number > 0 is supported

Aperta
#99,967 5 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@rhettinger ci sta già lavorando.

Dal 3/12/2022.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

docs

set.intersection help suggests 2 sets, while any number > 0 is supported

pydoc set.intersection states:

set.intersection = intersection(...)
Return the intersection of two sets as a new set.

(i.e. all elements that are in both sets.)

while in fact one or more sets can be passed to the function, e.g.

>>> set.intersection({0,1,2,3}, {1,2,3,4}, {2,3,4,5})
{2, 3}
>>> set.intersection({0,1,2,3})
{0, 1, 2, 3}
Lingua principale
Python
Stelle
77.2k
Fork
36k
Merge medio
1g 9h
PR unite (30g)
558

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/cpython

Tutte le issue di python/cpython

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.