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
b2793a47
Kaydet (Commit)
b2793a47
authored
Agu 07, 2008
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add some items
üst
3aa2a49e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
2.6.rst
Doc/whatsnew/2.6.rst
+23
-5
No files found.
Doc/whatsnew/2.6.rst
Dosyayı görüntüle @
b2793a47
...
...
@@ -785,7 +785,7 @@ documentation for a :ref:`complete list <formatstrings>`; here's a sample::
'%' - Percentage. Multiplies the number by 100 and displays
in fixed ('f') format, followed by a percent sign.
Classes and types can define a
__format__
method to control how they're
Classes and types can define a
:meth:`__format__`
method to control how they're
formatted. It receives a single argument, the format specifier::
def __format__(self, format_spec):
...
...
@@ -1515,10 +1515,22 @@ Here are all of the changes that Python 2.6 makes to the core Python language.
:func:`isnan`, return true if their floating-point argument is
infinite or Not A Number. (:issue:`1640`)
The float type has a new instance method :meth:`float.hex` and a
corresponding new class method :meth:`float.fromhex` to convert
floating-point numbers to and from hexadecimal strings,
respectively. (:issue:`3008`)
Conversion functions were added to convert floating-point numbers
into hexadecimal strings. (:issue:`3008`) These functions lets you
convert floats to and from a string representation without
introducing rounding errors from the conversion between decimal and
binary. Floats have a :meth:`hex` method that returns a string
representation, and the ``float.fromhex()`` method converts a string
back into a number::
>>> a = 3.75
>>> a.hex()
'0x1.e000000000000p+1'
>>> float.fromhex('0x1.e000000000000p+1')
3.75
>>> b=1./3
>>> b.hex()
'0x1.5555555555555p-2'
* The :mod:`math` module has a number of new functions, and the existing
functions have been improved to give more consistent behaviour
...
...
@@ -1633,6 +1645,12 @@ Optimizations
(Original optimization implemented by Armin Rigo, updated for
Python 2.6 by Kevin Jacobs; :issue:`1700288`.)
* Function calls that use keyword arguments
are significantly faster thanks to a patch that does a quick pointer
comparison, usually saving the time of a full string comparison.
(Contributed by Raymond Hettinger, after an initial implementation by
Antoine Pitrou; :issue:`1819`.)
* All of the functions in the :mod:`struct` module have been rewritten in
C, thanks to work at the Need For Speed sprint.
(Contributed by Raymond Hettinger.)
...
...
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