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
d297f1ad
Kaydet (Commit)
d297f1ad
authored
Haz 15, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#3117: backport r55087, fixes segfault with lambda (None,): None.
üst
7eb4a821
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
test_grammar.py
Lib/test/test_grammar.py
+1
-0
ast.c
Python/ast.c
+4
-0
No files found.
Lib/test/test_grammar.py
Dosyayı görüntüle @
d297f1ad
...
@@ -277,6 +277,7 @@ l5 = lambda x, y, z=2: x + y + z
...
@@ -277,6 +277,7 @@ l5 = lambda x, y, z=2: x + y + z
verify
(
l5
(
1
,
2
)
==
5
)
verify
(
l5
(
1
,
2
)
==
5
)
verify
(
l5
(
1
,
2
,
3
)
==
6
)
verify
(
l5
(
1
,
2
,
3
)
==
6
)
check_syntax
(
"lambda x: x = 2"
)
check_syntax
(
"lambda x: x = 2"
)
check_syntax
(
"lambda (None,): None"
)
### stmt: simple_stmt | compound_stmt
### stmt: simple_stmt | compound_stmt
# Tested below
# Tested below
...
...
Python/ast.c
Dosyayı görüntüle @
d297f1ad
...
@@ -249,6 +249,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
...
@@ -249,6 +249,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
goto
error
;
goto
error
;
asdl_seq_SET
(
stmts
,
0
,
Pass
(
n
->
n_lineno
,
n
->
n_col_offset
,
asdl_seq_SET
(
stmts
,
0
,
Pass
(
n
->
n_lineno
,
n
->
n_col_offset
,
arena
));
arena
));
if
(
!
asdl_seq_GET
(
stmts
,
0
))
goto
error
;
return
Interactive
(
stmts
,
arena
);
return
Interactive
(
stmts
,
arena
);
}
}
else
{
else
{
...
@@ -679,6 +681,8 @@ ast_for_arguments(struct compiling *c, const node *n)
...
@@ -679,6 +681,8 @@ ast_for_arguments(struct compiling *c, const node *n)
if
(
NCH
(
ch
)
!=
1
)
{
if
(
NCH
(
ch
)
!=
1
)
{
/* We have complex arguments, setup for unpacking. */
/* We have complex arguments, setup for unpacking. */
asdl_seq_SET
(
args
,
k
++
,
compiler_complex_args
(
c
,
ch
));
asdl_seq_SET
(
args
,
k
++
,
compiler_complex_args
(
c
,
ch
));
if
(
!
asdl_seq_GET
(
args
,
k
-
1
))
goto
error
;
}
else
{
}
else
{
/* def foo((x)): setup for checking NAME below. */
/* def foo((x)): setup for checking NAME below. */
/* Loop because there can be many parens and tuple
/* Loop because there can be many parens and tuple
...
...
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