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
df00f048
Kaydet (Commit)
df00f048
authored
May 10, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
Nick Coghlan
May 10, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-26701: Tweak the documentation for special methods in int(). (GH-6741)
üst
b00854ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
functions.rst
Doc/library/functions.rst
+6
-8
No files found.
Doc/library/functions.rst
Dosyayı görüntüle @
df00f048
...
...
@@ -671,8 +671,8 @@ are always available. They are listed here in alphabetical order.
.. function:: hex(x)
Convert an integer number to a lowercase hexadecimal string prefixed with
"0x". If
x
is not a Python :class:`int` object, it has to define an
__index__()
method that returns an integer. Some examples:
"0x". If
*x*
is not a Python :class:`int` object, it has to define an
:meth:`__index__`
method that returns an integer. Some examples:
>>> hex(255)
'0xff'
...
...
@@ -730,12 +730,10 @@ are always available. They are listed here in alphabetical order.
int(x, base=10)
Return an integer object constructed from a number or string *x*, or return
``0`` if no arguments are given. If *x* is a number, return
:meth:`x.__int__() <object.__int__>`. If *x* defines
:meth:`x.__trunc__() <object.__trunc__>` but not
:meth:`x.__int__() <object.__int__>`, then return
:meth:`x.__trunc__() <object.__trunc__>`. For floating point numbers,
this truncates towards zero.
``0`` if no arguments are given. If *x* defines :meth:`__int__`,
``int(x)`` returns ``x.__int__()``. If *x* defines :meth:`__trunc__`,
it returns ``x.__trunc__()``.
For floating point numbers, this truncates towards zero.
If *x* is not a number or if *base* is given, then *x* must be a string,
:class:`bytes`, or :class:`bytearray` instance representing an :ref:`integer
...
...
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