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
7bd081c1
Kaydet (Commit)
7bd081c1
authored
Tem 30, 2011
tarafından
Eli Bendersky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #12531: add index entries to documentation of * and ** in function calls
üst
43a976e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
expressions.rst
Doc/reference/expressions.rst
+11
-5
No files found.
Doc/reference/expressions.rst
Dosyayı görüntüle @
7bd081c1
...
...
@@ -667,12 +667,15 @@ dictionary containing the excess keyword arguments (using the keywords as keys
and the argument values as corresponding values), or a (new) empty dictionary if
there were no excess keyword arguments.
.. index::
single: *; in function calls
If the syntax ``*expression`` appears in the function call, ``expression`` must
evaluate to a
sequence. Elements from this sequence are treated as if they were
additional positional arguments; if there are positional arguments *x1*,...,
*x
N*, and ``expression`` evaluates to a sequence *y1*, ..., *yM*, this is
equivalent to a call with M+N positional arguments *x1*, ..., *xN*, *y1*, ...
,
*yM*.
evaluate to a
n iterable. Elements from this iterable are treated as if they
were additional positional arguments; if there are positional arguments
*x
1*, ... ,*xN*, and ``expression`` evaluates to a sequence *y1*, ..., *yM*,
this is equivalent to a call with M+N positional arguments *x1*, ..., *xN*
,
*y
1*, ..., *y
M*.
A consequence of this is that although the ``*expression`` syntax may appear
*after* some keyword arguments, it is processed *before* the keyword arguments
...
...
@@ -693,6 +696,9 @@ A consequence of this is that although the ``*expression`` syntax may appear
It is unusual for both keyword arguments and the ``*expression`` syntax to be
used in the same call, so in practice this confusion does not arise.
.. index::
single: **; in function calls
If the syntax ``**expression`` appears in the function call, ``expression`` must
evaluate to a mapping, the contents of which are treated as additional keyword
arguments. In the case of a keyword appearing in both ``expression`` and as an
...
...
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