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
f96e0d20
Kaydet (Commit)
f96e0d20
authored
Eyl 09, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Various clarifications and minor nits fixed. Affected descriptions of
input(), locals(), reload(), unicode(), and zip().
üst
1172a851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
libfuncs.tex
Doc/lib/libfuncs.tex
+21
-7
No files found.
Doc/lib/libfuncs.tex
Dosyayı görüntüle @
f96e0d20
...
...
@@ -310,6 +310,19 @@ module from which it is called).
\begin{funcdesc}
{
input
}{
\optional
{
prompt
}}
Equivalent to
\code
{
eval(raw
_
input(
\var
{
prompt
}
))
}
.
\strong
{
Warning:
}
This function is not safe from user errors! It
expects a valid Python expression as input; if the input is not
syntactically valid, a
\exception
{
SyntaxError
}
will be raised.
Other exceptions may be raised if there is an error during
evaluation. (On the other hand, sometimes this is exactly what you
need when writing a quick script for expert use.)
If the
\module
{
readline
}
module was loaded, then
\function
{
input()
}
will use it to provide elaborate line editing and
history features.
Consider using the
\function
{
raw
_
input()
}
function for general input
from users.
\end{funcdesc}
\begin{funcdesc}
{
int
}{
x
\optional
{
, radix
}}
...
...
@@ -374,7 +387,7 @@ returns \code{['a', 'b', 'c']} and \code{list( (1, 2, 3) )} returns
\begin{funcdesc}
{
locals
}{}
Return a dictionary representing the current local symbol table.
\strong
{
Warning:
}
t
he contents of this dictionary should not be
\strong
{
Warning:
}
T
he contents of this dictionary should not be
modified; changes may not affect the values of local variables used by
the interpreter.
\end{funcdesc}
...
...
@@ -574,7 +587,7 @@ and skip its initialization if desired.
It is legal though generally not very useful to reload built-in or
dynamically loaded modules, except for
\module
{
sys
}
,
\module
{__
main
__}
and
\module
{__
builtin
__}
. In
certain
cases, however, extension
and
\module
{__
builtin
__}
. In
many
cases, however, extension
modules are not designed to be initialized more than once, and may
fail in arbitrary ways when reloaded.
...
...
@@ -669,11 +682,11 @@ strings. The argument must be in the range [0..65535], inclusive.
\versionadded
{
2.0
}
\end{funcdesc}
\begin{funcdesc}
{
unicode
}{
string
\optional
{
, encoding
='utf-8'
\optional
{
, errors='strict'
}}}
\begin{funcdesc}
{
unicode
}{
string
\optional
{
, encoding
\optional
{
, errors
}}}
Decodes
\var
{
string
}
using the codec for
\var
{
encoding
}
. Error
handling is done according to
\var
{
errors
}
. The default behavior is
to decode UTF-8 in strict mode, meaning that encoding errors raise
\exception
{
ValueError
}
.
\exception
{
ValueError
}
.
See also the
\refmodule
{
codecs
}
module.
\versionadded
{
2.0
}
\end{funcdesc}
...
...
@@ -706,8 +719,9 @@ This function returns a list of tuples, where each tuple contains the
\var
{
i
}
-th element from each of the argument sequences. At least one
sequence is required, otherwise a
\exception
{
TypeError
}
is raised.
The returned list is truncated in length to the length of the shortest
argument sequence. When the argument sequences are all of the same
length,
\function
{
zip()
}
is similar to
\function
{
map()
}
with an
initial argument of
\code
{
None
}
.
argument sequence. When there are multiple argument sequences which
are all of the same length,
\function
{
zip()
}
is similar to
\function
{
map()
}
with an initial argument of
\code
{
None
}
. With a
single sequence argument, it returns a list of 1-tuples.
\versionadded
{
2.0
}
\end{funcdesc}
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