Closed NeilGirdhar closed 1 year ago
It reads:
The general idea that an attributes of intersected types become unions holds also for all kinds of collections. dict[str, int] & dict[bytes, float] => dict[str|bytes, float|int] list[str] & list[bytes] => list[str|bytes] tuple[str, float] & tuple[bytes, int] => tuple[str|bytes, float|int] I think it should be: dict[str, int] & dict[bytes, float] => Never list[str] & list[bytes] => Never tuple[str, float] & tuple[bytes, int] => Never
The general idea that an attributes of intersected types become unions holds also for all kinds of collections.
dict[str, int] & dict[bytes, float] => dict[str|bytes, float|int] list[str] & list[bytes] => list[str|bytes] tuple[str, float] & tuple[bytes, int] => tuple[str|bytes, float|int]
I think it should be:
dict[str, int] & dict[bytes, float] => Never list[str] & list[bytes] => Never tuple[str, float] & tuple[bytes, int] => Never
I think the section should just be removed, or it should read that the rules follow from covariance/invariance/contravariance.
seems related to #6 It's the same interior union instead of intersection issue.
I've removed the collection section
It reads:
I think the section should just be removed, or it should read that the rules follow from covariance/invariance/contravariance.