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
4b2a2a42
Kaydet (Commit)
4b2a2a42
authored
Mar 10, 2017
tarafından
Ivan Levkivskyi
Kaydeden (comit)
Brett Cannon
Mar 10, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-250)
üst
74002547
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
31 deletions
+40
-31
dis.rst
Doc/library/dis.rst
+40
-31
No files found.
Doc/library/dis.rst
Dosyayı görüntüle @
4b2a2a42
...
...
@@ -1009,21 +1009,52 @@ All of the following opcodes use their arguments.
.. opcode:: CALL_FUNCTION (argc)
Calls a function. The low byte of *argc* indicates the number of positional
parameters, the high byte the number of keyword parameters. On the stack, the
opcode finds the keyword parameters first. For each keyword argument, the
value is on top of the key. Below the keyword parameters, the positional
parameters are on the stack, with the right-most parameter on top. Below the
parameters, the function object to call is on the stack. Pops all function
arguments, and the function itself off the stack, and pushes the return
value.
Calls a function. *argc* indicates the number of positional arguments.
The positional arguments are on the stack, with the right-most argument
on top. Below the arguments, the function object to call is on the stack.
Pops all function arguments, and the function itself off the stack, and
pushes the return value.
.. versionchanged:: 3.6
This opcode is used only for calls with positional arguments.
.. opcode:: CALL_FUNCTION_KW (argc)
Calls a function. *argc* indicates the number of arguments (positional
and keyword). The top element on the stack contains a tuple of keyword
argument names. Below the tuple, keyword arguments are on the stack, in
the order corresponding to the tuple. Below the keyword arguments, the
positional arguments are on the stack, with the right-most parameter on
top. Below the arguments, the function object to call is on the stack.
Pops all function arguments, and the function itself off the stack, and
pushes the return value.
.. versionchanged:: 3.6
Keyword arguments are packed in a tuple instead of a dictionary,
*argc* indicates the total number of arguments
.. opcode:: CALL_FUNCTION_EX (flags)
Calls a function. The lowest bit of *flags* indicates whether the
var-keyword argument is placed at the top of the stack. Below the
var-keyword argument, the var-positional argument is on the stack.
Below the arguments, the function object to call is placed.
Pops all function arguments, and the function itself off the stack, and
pushes the return value. Note that this opcode pops at most three items
from the stack. Var-positional and var-keyword arguments are packed
by :opcode:`BUILD_MAP_UNPACK_WITH_CALL` and
:opcode:`BUILD_MAP_UNPACK_WITH_CALL`.
.. versionadded:: 3.6
.. opcode:: LOAD_METHOD (namei)
Loads a method named ``co_names[namei]`` from TOS object. TOS is popped and
method and TOS are pushed when interpreter can call unbound method directly.
TOS will be u
es
d as the first argument (``self``) by :opcode:`CALL_METHOD`.
TOS will be u
se
d as the first argument (``self``) by :opcode:`CALL_METHOD`.
Otherwise, ``NULL`` and method is pushed (method is bound method or
something else).
...
...
@@ -1071,28 +1102,6 @@ All of the following opcodes use their arguments.
two most-significant bytes.
.. opcode:: CALL_FUNCTION_VAR (argc)
Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
top element on the stack contains the variable argument list, followed by
keyword and positional arguments.
.. opcode:: CALL_FUNCTION_KW (argc)
Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
top element on the stack contains the keyword arguments dictionary, followed
by explicit keyword and positional arguments.
.. opcode:: CALL_FUNCTION_VAR_KW (argc)
Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
top element on the stack contains the keyword arguments dictionary, followed
by the variable-arguments tuple, followed by explicit keyword and positional
arguments.
.. opcode:: FORMAT_VALUE (flags)
Used for implementing formatted literal strings (f-strings). Pops
...
...
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