Document how joins work
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
Start by locating the mypy documentation covering type inference for collections and related typing behavior. Use the A, B, and C example from the issue to verify how inferred common base classes differ from an explicitly annotated Union. Done means the behavior is explained with accessible examples without relying heavily on the term “join”.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Joins tend to produce common base classes instead of unions, and this may be surprising. I don't think that this is documented, at least not very clearly. The discussion probably shouldn't rely heavily on the relatively obscure term "join" (especially as the operation technically isn't quite a lattice join) -- rather we can use examples and more informal explanations.
Typical example where this is relevant:
class A: pass
class B(A): pass
class C(A): pass
x = [B(), C()] # Inferrred type List[A], not List[Union[B, C]]
y: List[Union[B, C]]
y = [B(), C()] # Now the type is List[Union[B, C]]
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Merge medio
- 1g 18h
- PR unite (30g)
- 54
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python/mypy
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
bug topic-configuration topic-error-reporting
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Issue simili
-
link-check link-check:sphinx-theme
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
OpenHands/extensions#626 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
CSCfi/sd-search-api#39 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100