Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
de12b79c
Kaydet (Commit)
de12b79c
authored
May 16, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
allow test node after ** in calls (closes #24176)
üst
8de32d90
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
10 deletions
+7
-10
Grammar
Grammar/Grammar
+1
-1
test_grammar.py
Lib/test/test_grammar.py
+1
-0
parsermodule.c
Modules/parsermodule.c
+1
-1
graminit.c
Python/graminit.c
+4
-8
No files found.
Grammar/Grammar
Dosyayı görüntüle @
de12b79c
...
@@ -136,7 +136,7 @@ arglist: argument (',' argument)* [',']
...
@@ -136,7 +136,7 @@ arglist: argument (',' argument)* [',']
# that precede iterable unpackings are blocked; etc.
# that precede iterable unpackings are blocked; etc.
argument: ( test [comp_for] |
argument: ( test [comp_for] |
test '=' test |
test '=' test |
'**'
expr
|
'**'
test
|
star_expr )
star_expr )
comp_iter: comp_for | comp_if
comp_iter: comp_for | comp_if
...
...
Lib/test/test_grammar.py
Dosyayı görüntüle @
de12b79c
...
@@ -206,6 +206,7 @@ class GrammarTests(unittest.TestCase):
...
@@ -206,6 +206,7 @@ class GrammarTests(unittest.TestCase):
d01
(
1
)
d01
(
1
)
d01
(
*
(
1
,))
d01
(
*
(
1
,))
d01
(
**
{
'a'
:
2
})
d01
(
**
{
'a'
:
2
})
d01
(
**
{
'a'
:
2
}
or
{})
def
d11
(
a
,
b
=
1
):
pass
def
d11
(
a
,
b
=
1
):
pass
d11
(
1
)
d11
(
1
)
d11
(
1
,
2
)
d11
(
1
,
2
)
...
...
Modules/parsermodule.c
Dosyayı görüntüle @
de12b79c
...
@@ -2871,7 +2871,7 @@ validate_argument(node *tree)
...
@@ -2871,7 +2871,7 @@ validate_argument(node *tree)
if
(
res
)
{
if
(
res
)
{
if
(
TYPE
(
CHILD
(
tree
,
0
))
==
DOUBLESTAR
)
{
if
(
TYPE
(
CHILD
(
tree
,
0
))
==
DOUBLESTAR
)
{
res
=
validate_
expr
(
CHILD
(
tree
,
1
));
res
=
validate_
test
(
CHILD
(
tree
,
1
));
}
}
else
if
(
nch
==
1
)
{
else
if
(
nch
==
1
)
{
res
=
validate_test_or_star_expr
(
CHILD
(
tree
,
0
));
res
=
validate_test_or_star_expr
(
CHILD
(
tree
,
0
));
...
...
Python/graminit.c
Dosyayı görüntüle @
de12b79c
...
@@ -1748,24 +1748,20 @@ static arc arcs_78_0[3] = {
...
@@ -1748,24 +1748,20 @@ static arc arcs_78_0[3] = {
};
};
static
arc
arcs_78_1
[
3
]
=
{
static
arc
arcs_78_1
[
3
]
=
{
{
164
,
3
},
{
164
,
3
},
{
31
,
4
},
{
31
,
2
},
{
0
,
1
},
{
0
,
1
},
};
};
static
arc
arcs_78_2
[
1
]
=
{
static
arc
arcs_78_2
[
1
]
=
{
{
107
,
3
},
{
26
,
3
},
};
};
static
arc
arcs_78_3
[
1
]
=
{
static
arc
arcs_78_3
[
1
]
=
{
{
0
,
3
},
{
0
,
3
},
};
};
static
arc
arcs_78_4
[
1
]
=
{
static
state
states_78
[
4
]
=
{
{
26
,
3
},
};
static
state
states_78
[
5
]
=
{
{
3
,
arcs_78_0
},
{
3
,
arcs_78_0
},
{
3
,
arcs_78_1
},
{
3
,
arcs_78_1
},
{
1
,
arcs_78_2
},
{
1
,
arcs_78_2
},
{
1
,
arcs_78_3
},
{
1
,
arcs_78_3
},
{
1
,
arcs_78_4
},
};
};
static
arc
arcs_79_0
[
2
]
=
{
static
arc
arcs_79_0
[
2
]
=
{
{
164
,
1
},
{
164
,
1
},
...
@@ -2021,7 +2017,7 @@ static dfa dfas[85] = {
...
@@ -2021,7 +2017,7 @@ static dfa dfas[85] = {
"
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001
"
},
"
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001
"
},
{
333
,
"arglist"
,
0
,
3
,
states_77
,
{
333
,
"arglist"
,
0
,
3
,
states_77
,
"
\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000
"
},
"
\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000
"
},
{
334
,
"argument"
,
0
,
5
,
states_78
,
{
334
,
"argument"
,
0
,
4
,
states_78
,
"
\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000
"
},
"
\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000
"
},
{
335
,
"comp_iter"
,
0
,
2
,
states_79
,
{
335
,
"comp_iter"
,
0
,
2
,
states_79
,
"
\000\000\000\000\000\000\000\000\000\000\000\000\021\000\000\000\000\000\000\000\000\000
"
},
"
\000\000\000\000\000\000\000\000\000\000\000\000\021\000\000\000\000\000\000\000\000\000
"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment