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
e8db162f
Kaydet (Commit)
e8db162f
authored
Mar 10, 2014
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
whatsnew: PEP 424 implementation.
üst
d840b8d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
object.rst
Doc/c-api/object.rst
+3
-3
operator.rst
Doc/library/operator.rst
+2
-2
3.4.rst
Doc/whatsnew/3.4.rst
+13
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Doc/c-api/object.rst
Dosyayı görüntüle @
e8db162f
...
...
@@ -357,9 +357,9 @@ attribute is considered sufficient for this determination.
.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t default)
Return an estimated length for the object *o*. First try
ing
to return its
actual length, then an estimate using
``__length_hint__``, and finally
returning the default value. On error ``-1`` is returned
. This is the
Return an estimated length for the object *o*. First try to return its
actual length, then an estimate using
:meth:`~object.__length_hint__`, and
finally return the default value. On error return ``-1``
. This is the
equivalent to the Python expression ``operator.length_hint(o, default)``.
.. versionadded:: 3.4
...
...
Doc/library/operator.rst
Dosyayı görüntüle @
e8db162f
...
...
@@ -240,9 +240,9 @@ their character equivalents.
.. function:: length_hint(obj, default=0)
Return an estimated length for the object *o*. First try
ing
to return its
Return an estimated length for the object *o*. First try to return its
actual length, then an estimate using :meth:`object.__length_hint__`, and
finally return
ing
the default value.
finally return the default value.
.. versionadded:: 3.4
...
...
Doc/whatsnew/3.4.rst
Dosyayı görüntüle @
e8db162f
...
...
@@ -393,6 +393,10 @@ Some smaller changes made to the core Python language are:
several cases as a result of the introduction of Argument Clinic and other
changes to the :mod:`inspect` and :mod:`pydoc` modules.
* :meth:`~object.__length_hint__` is now part of the formal language
specification (see :pep:`424`). (Contributed by Armin Ronacher in
:issue:`16148`.)
New Modules
===========
...
...
@@ -1098,6 +1102,11 @@ There is now a pure-python version of the :mod:`operator` module available for
reference and for use by alternate implementations of Python. (Contributed by
Zachary Ware in :issue:`16694`.)
New function :func:`~operator.length_hint` provides an implementation of the
specification for how the :meth:`~object.__length_hint__` special method should
be used, as part of the :pep:`424` formal specification of this language
feature. (Contributed by Armin Ronacher in :issue:`16148`.)
os
--
...
...
@@ -1800,6 +1809,10 @@ Other Build and C API Changes
<http://en.wikipedia.org/wiki/Data_Execution_Prevention>`_. (Contributed by
Christian Heimes in :issue:`16632`.)
* New function :c:func:`PyObject_LengthHint` is the C API equivalent
of :func:`operator.length_hint`. (Contributed by Armin Ronacher in
:issue:`16148`.)
.. _other-improvements-3.4:
...
...
Misc/NEWS
Dosyayı görüntüle @
e8db162f
...
...
@@ -2538,6 +2538,9 @@ Core and Builtins
- Issue #16160: Subclass support now works for types.SimpleNamespace.
- Issue #16148: Implement PEP 424, adding operator.length_hint and
PyObject_LengthHint.
- Upgrade Unicode data (UCD) to version 6.2.
- Issue #15379: Fix passing of non-BMP characters as integers for the charmap
...
...
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