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
1cd26f2f
Kaydet (Commit)
1cd26f2f
authored
Nis 02, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add complex().
Update int(), long(), float() to support string conversions.
üst
740eb826
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
10 deletions
+60
-10
libfuncs.tex
Doc/lib/libfuncs.tex
+30
-5
libfuncs.tex
Doc/libfuncs.tex
+30
-5
No files found.
Doc/lib/libfuncs.tex
Dosyayı görüntüle @
1cd26f2f
...
@@ -57,6 +57,14 @@ be added to the end of the the argument list.
...
@@ -57,6 +57,14 @@ be added to the end of the the argument list.
\code
{
None
}
will printed).
\code
{
None
}
will printed).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
complex
}{
real
\optional
{
, imag
}}
Create a complex number with the value
\var
{
real
}
+
\var
{
imag
}
*j.
Each argument may be any numeric type (including complex).
If
\var
{
imag
}
is omitted, it defaults to zero and the function
serves as a numeric conversion function like
\code
{
int
}
,
\code
{
long
}
and
\code
{
float
}
.
\end{funcdesc}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
This is a relative of
\code
{
setattr
}
. The arguments are an
This is a relative of
\code
{
setattr
}
. The arguments are an
object and a string. The string must be the name
object and a string. The string must be the name
...
@@ -153,8 +161,14 @@ removed.
...
@@ -153,8 +161,14 @@ removed.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
float
}{
x
}
\begin{funcdesc}
{
float
}{
x
}
Convert a number to floating point. The argument may be a plain or
Convert a string or a number to floating point. If the argument is a
long integer or a floating point number.
string, it must contain a possibly singed decimal or floating point
number, possibly embedded in whitespace;
this behaves identical to
\code
{
string.atof(
\var
{
x
}
)
}
.
Otherwise, the argument may be a plain or
long integer or a floating point number, and a floating point number
with the same value (within Python's floating point precision) is
returned.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
getattr
}{
object
\,
name
}
\begin{funcdesc}
{
getattr
}{
object
\,
name
}
...
@@ -226,7 +240,11 @@ module from which it is called).
...
@@ -226,7 +240,11 @@ module from which it is called).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
int
}{
x
}
\begin{funcdesc}
{
int
}{
x
}
Convert a number to a plain integer. The argument may be a plain or
Convert a string or number to a plain integer. If the argument is a
string, it must contain a possibly singed decimal number
representable as a Python integer, possibly embedded in whitespace;
this behaves identical to
\code
{
string.atoi(
\var
{
x
}
)
}
.
Otherwise, the argument may be a plain or
long integer or a floating point number. Conversion of floating
long integer or a floating point number. Conversion of floating
point numbers to integers is defined by the C semantics; normally
point numbers to integers is defined by the C semantics; normally
the conversion truncates towards zero.
\footnote
{
This is ugly --- the
the conversion truncates towards zero.
\footnote
{
This is ugly --- the
...
@@ -245,8 +263,15 @@ desired effect.
...
@@ -245,8 +263,15 @@ desired effect.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
long
}{
x
}
\begin{funcdesc}
{
long
}{
x
}
Convert a number to a long integer. The argument may be a plain or
Convert a string or number to a long integer. If the argument is a
long integer or a floating point number.
string, it must contain a possibly singed decimal number of
arbitrary size, possibly embedded in whitespace;
this behaves identical to
\code
{
string.atol(
\var
{
x
}
)
}
.
Otherwise, the argument may be a plain or
long integer or a floating point number, and a long interger with
the same value is returned. Conversion of floating
point numbers to integers is defined by the C semantics;
see the description of
\code
{
int()
}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
map
}{
function
\,
list
\,
...
}
\begin{funcdesc}
{
map
}{
function
\,
list
\,
...
}
...
...
Doc/libfuncs.tex
Dosyayı görüntüle @
1cd26f2f
...
@@ -57,6 +57,14 @@ be added to the end of the the argument list.
...
@@ -57,6 +57,14 @@ be added to the end of the the argument list.
\code
{
None
}
will printed).
\code
{
None
}
will printed).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
complex
}{
real
\optional
{
, imag
}}
Create a complex number with the value
\var
{
real
}
+
\var
{
imag
}
*j.
Each argument may be any numeric type (including complex).
If
\var
{
imag
}
is omitted, it defaults to zero and the function
serves as a numeric conversion function like
\code
{
int
}
,
\code
{
long
}
and
\code
{
float
}
.
\end{funcdesc}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
This is a relative of
\code
{
setattr
}
. The arguments are an
This is a relative of
\code
{
setattr
}
. The arguments are an
object and a string. The string must be the name
object and a string. The string must be the name
...
@@ -153,8 +161,14 @@ removed.
...
@@ -153,8 +161,14 @@ removed.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
float
}{
x
}
\begin{funcdesc}
{
float
}{
x
}
Convert a number to floating point. The argument may be a plain or
Convert a string or a number to floating point. If the argument is a
long integer or a floating point number.
string, it must contain a possibly singed decimal or floating point
number, possibly embedded in whitespace;
this behaves identical to
\code
{
string.atof(
\var
{
x
}
)
}
.
Otherwise, the argument may be a plain or
long integer or a floating point number, and a floating point number
with the same value (within Python's floating point precision) is
returned.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
getattr
}{
object
\,
name
}
\begin{funcdesc}
{
getattr
}{
object
\,
name
}
...
@@ -226,7 +240,11 @@ module from which it is called).
...
@@ -226,7 +240,11 @@ module from which it is called).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
int
}{
x
}
\begin{funcdesc}
{
int
}{
x
}
Convert a number to a plain integer. The argument may be a plain or
Convert a string or number to a plain integer. If the argument is a
string, it must contain a possibly singed decimal number
representable as a Python integer, possibly embedded in whitespace;
this behaves identical to
\code
{
string.atoi(
\var
{
x
}
)
}
.
Otherwise, the argument may be a plain or
long integer or a floating point number. Conversion of floating
long integer or a floating point number. Conversion of floating
point numbers to integers is defined by the C semantics; normally
point numbers to integers is defined by the C semantics; normally
the conversion truncates towards zero.
\footnote
{
This is ugly --- the
the conversion truncates towards zero.
\footnote
{
This is ugly --- the
...
@@ -245,8 +263,15 @@ desired effect.
...
@@ -245,8 +263,15 @@ desired effect.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
long
}{
x
}
\begin{funcdesc}
{
long
}{
x
}
Convert a number to a long integer. The argument may be a plain or
Convert a string or number to a long integer. If the argument is a
long integer or a floating point number.
string, it must contain a possibly singed decimal number of
arbitrary size, possibly embedded in whitespace;
this behaves identical to
\code
{
string.atol(
\var
{
x
}
)
}
.
Otherwise, the argument may be a plain or
long integer or a floating point number, and a long interger with
the same value is returned. Conversion of floating
point numbers to integers is defined by the C semantics;
see the description of
\code
{
int()
}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
map
}{
function
\,
list
\,
...
}
\begin{funcdesc}
{
map
}{
function
\,
list
\,
...
}
...
...
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