Merge remote-tracking branch 'origin/master' into typeshed

This commit is contained in:
Dave Halter committed 2018-09-24 00:16:13 +02:00
commit ef9d0421fa
8 files changed
+118 -34

No files matched your search

+43
View File
@@ -131,3 +131,46 @@ set_t2 = set()
#? ['clear', 'copy']
set_t2.c
# -----------------
# pep 448 unpacking generalizations
# -----------------
# python >= 3.5
d = {'a': 3}
#? dict()
{**d}
#? str()
{**d, "b": "b"}["b"]
# Should resolve to int() but jedi is not smart enough yet
# Here to make sure it doesn't result in crash though
#?
{**d}["a"]
s = {1, 2, 3}
#? set()
{*s}
#? set()
{*s, 4, *s}
s = {1, 2, 3}
# Should resolve to int() but jedi is not smart enough yet
# Here to make sure it doesn't result in crash though
#?
{*s}.pop()
#? int()
{*s, 4}.pop()
# Should resolve to int() but jedi is not smart enough yet
# Here to make sure it doesn't result in crash though
#?
[*s][0]
#? int()
[*s, 4][0]