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
edef2be4
Kaydet (Commit)
edef2be4
authored
Tem 12, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1520864: unpacking singleton tuples in for loop (for x, in) work again.
üst
3b9be2ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
test_grammar.py
Lib/test/test_grammar.py
+5
-0
NEWS
Misc/NEWS
+2
-0
ast.c
Python/ast.c
+6
-2
import.c
Python/import.c
+1
-0
No files found.
Lib/test/test_grammar.py
Dosyayı görüntüle @
edef2be4
...
@@ -531,6 +531,11 @@ n = 0
...
@@ -531,6 +531,11 @@ n = 0
for
x
in
Squares
(
10
):
n
=
n
+
x
for
x
in
Squares
(
10
):
n
=
n
+
x
if
n
!=
285
:
raise
TestFailed
,
'for over growing sequence'
if
n
!=
285
:
raise
TestFailed
,
'for over growing sequence'
result
=
[]
for
x
,
in
[(
1
,),
(
2
,),
(
3
,)]:
result
.
append
(
x
)
vereq
(
result
,
[
1
,
2
,
3
])
print
'try_stmt'
print
'try_stmt'
### try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite]
### try_stmt: 'try' ':' suite (except_clause ':' suite)+ ['else' ':' suite]
### | 'try' ':' suite 'finally' ':' suite
### | 'try' ':' suite 'finally' ':' suite
...
...
Misc/NEWS
Dosyayı görüntüle @
edef2be4
...
@@ -12,6 +12,8 @@ What's New in Python 2.5 beta 2?
...
@@ -12,6 +12,8 @@ What's New in Python 2.5 beta 2?
Core and builtins
Core and builtins
-----------------
-----------------
- Bug #1520864: unpacking singleton tuples in for loop (for x, in) work again.
- Bug #1441486: The literal representation of -(sys.maxint - 1)
- Bug #1441486: The literal representation of -(sys.maxint - 1)
again evaluates to a int object, not a long.
again evaluates to a int object, not a long.
...
...
Python/ast.c
Dosyayı görüntüle @
edef2be4
...
@@ -2666,6 +2666,7 @@ ast_for_for_stmt(struct compiling *c, const node *n)
...
@@ -2666,6 +2666,7 @@ ast_for_for_stmt(struct compiling *c, const node *n)
asdl_seq
*
_target
,
*
seq
=
NULL
,
*
suite_seq
;
asdl_seq
*
_target
,
*
seq
=
NULL
,
*
suite_seq
;
expr_ty
expression
;
expr_ty
expression
;
expr_ty
target
;
expr_ty
target
;
const
node
*
node_target
;
/* for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite] */
/* for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite] */
REQ
(
n
,
for_stmt
);
REQ
(
n
,
for_stmt
);
...
@@ -2675,10 +2676,13 @@ ast_for_for_stmt(struct compiling *c, const node *n)
...
@@ -2675,10 +2676,13 @@ ast_for_for_stmt(struct compiling *c, const node *n)
return
NULL
;
return
NULL
;
}
}
_target
=
ast_for_exprlist
(
c
,
CHILD
(
n
,
1
),
Store
);
node_target
=
CHILD
(
n
,
1
);
_target
=
ast_for_exprlist
(
c
,
node_target
,
Store
);
if
(
!
_target
)
if
(
!
_target
)
return
NULL
;
return
NULL
;
if
(
asdl_seq_LEN
(
_target
)
==
1
)
/* Check the # of children rather than the length of _target, since
for x, in ... has 1 element in _target, but still requires a Tuple. */
if
(
NCH
(
node_target
)
==
1
)
target
=
(
expr_ty
)
asdl_seq_GET
(
_target
,
0
);
target
=
(
expr_ty
)
asdl_seq_GET
(
_target
,
0
);
else
else
target
=
Tuple
(
_target
,
Store
,
LINENO
(
n
),
n
->
n_col_offset
,
c
->
c_arena
);
target
=
Tuple
(
_target
,
Store
,
LINENO
(
n
),
n
->
n_col_offset
,
c
->
c_arena
);
...
...
Python/import.c
Dosyayı görüntüle @
edef2be4
...
@@ -60,6 +60,7 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *);
...
@@ -60,6 +60,7 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *);
Python 2.5a0: 62081 (ast-branch)
Python 2.5a0: 62081 (ast-branch)
Python 2.5a0: 62091 (with)
Python 2.5a0: 62091 (with)
Python 2.5a0: 62092 (changed WITH_CLEANUP opcode)
Python 2.5a0: 62092 (changed WITH_CLEANUP opcode)
Python 2.5c1: 62101 (fix wrong code: for x, in ...)
.
.
*/
*/
#define MAGIC (62092 | ((long)'\r'<<16) | ((long)'\n'<<24))
#define MAGIC (62092 | ((long)'\r'<<16) | ((long)'\n'<<24))
...
...
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