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
68f4dd8b
Kaydet (Commit)
68f4dd8b
authored
Eyl 09, 2016
tarafından
Eric Snow
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Doc updates for PEPs 520 and 468.
üst
6982a4f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
12 deletions
+22
-12
datamodel.rst
Doc/reference/datamodel.rst
+3
-3
3.6.rst
Doc/whatsnew/3.6.rst
+19
-9
No files found.
Doc/reference/datamodel.rst
Dosyayı görüntüle @
68f4dd8b
...
@@ -1801,9 +1801,9 @@ included in the class definition (if any) and the resulting object is bound
...
@@ -1801,9 +1801,9 @@ included in the class definition (if any) and the resulting object is bound
in the local namespace as the defined class.
in the local namespace as the defined class.
When a new class is created by ``type.__new__``, the object provided as the
When a new class is created by ``type.__new__``, the object provided as the
namespace parameter is copied to a
standard Python dictionary
and the original
namespace parameter is copied to a
new ordered mapping
and the original
object is discarded. The new copy
becomes the :attr:`~object.__dict__` attribute
object is discarded. The new copy
is wrapped in a read-only proxy, which
of the class object.
becomes the :attr:`~object.__dict__` attribute
of the class object.
.. seealso::
.. seealso::
...
...
Doc/whatsnew/3.6.rst
Dosyayı görüntüle @
68f4dd8b
...
@@ -116,7 +116,10 @@ Windows improvements:
...
@@ -116,7 +116,10 @@ Windows improvements:
:pep:`4XX` - Python Virtual Environments
:pep:`4XX` - Python Virtual Environments
PEP written by Carl Meyer
PEP written by Carl Meyer
.. XXX PEP 520: :ref:`Preserving Class Attribute Definition Order<whatsnew-deforder>`
* PEP 520: :ref:`Preserving Class Attribute Definition Order<whatsnew-deforder>`
* PEP 468: :ref:`Preserving Keyword Argument Order<whatsnew-kwargs>`
New Features
New Features
============
============
...
@@ -380,17 +383,10 @@ PEP 520: Preserving Class Attribute Definition Order
...
@@ -380,17 +383,10 @@ PEP 520: Preserving Class Attribute Definition Order
Attributes in a class definition body have a natural ordering: the same
Attributes in a class definition body have a natural ordering: the same
order in which the names appear in the source. This order is now
order in which the names appear in the source. This order is now
preserved in the new class's ``__definition_order__`` attribute. It is
preserved in the new class's ``__dict__`` attribute.
a tuple of the attribute names, in the order in which they appear in
the class definition body.
For types that don't have a definition (e.g. builtins), or the attribute
order could not be determined, ``__definition_order__`` is ``None``.
Also, the effective default class *execution* namespace (returned from
Also, the effective default class *execution* namespace (returned from
``type.__prepare__()``) is now an insertion-order-preserving mapping.
``type.__prepare__()``) is now an insertion-order-preserving mapping.
For CPython, it is now ``collections.OrderedDict``. Note that the
class namespace, ``cls.__dict__``, is unchanged.
.. seealso::
.. seealso::
...
@@ -398,6 +394,20 @@ class namespace, ``cls.__dict__``, is unchanged.
...
@@ -398,6 +394,20 @@ class namespace, ``cls.__dict__``, is unchanged.
PEP written and implemented by Eric Snow.
PEP written and implemented by Eric Snow.
.. _whatsnew-kwargs:
PEP 468: Preserving Keyword Argument Order
==========================================
``**kwargs`` in a function signature is now guaranteed to be an
insertion-order-preserving mapping.
.. seealso::
:pep:`468` - Preserving Keyword Argument Order
PEP written and implemented by Eric Snow.
PEP 509: Add a private version to dict
PEP 509: Add a private version to dict
--------------------------------------
--------------------------------------
...
...
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