Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P972
mypy wat
Active
Public
Actions
Authored by
vlorentz
on Mar 11 2021, 4:28 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
from
typing
import
List
def
f
()
->
None
:
l1
:
List
[
str
]
=
[
"foo"
]
l2
:
List
[
int
]
=
[
42
]
if
list
(
l1
)
and
list
(
l2
):
# foo.py:6: error: Argument 1 to "list" has incompatible type "List[int]"; expected "Iterable[str]"
print
(
"hello"
)
Event Timeline
vlorentz
created this paste.
Mar 11 2021, 4:28 PM
2021-03-11 16:28:29 (UTC+1)
vlorentz
updated the paste's language from
autodetect
to
python
.
Log In to Comment