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
93692bba
Kaydet (Commit)
93692bba
authored
Mar 30, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
What's New in Python 3.5: add pep 461 (bytes%args) and 465 (a@b)
üst
5fdde71c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
3 deletions
+42
-3
3.5.rst
Doc/whatsnew/3.5.rst
+42
-3
No files found.
Doc/whatsnew/3.5.rst
Dosyayı görüntüle @
93692bba
...
...
@@ -64,12 +64,12 @@ For full details, see the :source:`Misc/NEWS` file.
Summary -- Release highlights
=============================
.. This section singles out the most important changes in Python 3.
3
.
.. This section singles out the most important changes in Python 3.
5
.
Brevity is key.
New syntax features:
*
None yet
.
*
:pep:`465`, a new matrix multiplication operator: ``a @ b``
.
New library modules:
...
...
@@ -78,7 +78,8 @@ New library modules:
New built-in features:
* None yet.
* ``bytes % args``, ``bytearray % args``: :pep:`461` - Adding ``%`` formatting
to bytes and bytearray
Implementation improvements:
...
...
@@ -114,6 +115,44 @@ Please read on for a comprehensive list of user-facing changes.
PEP written by Carl Meyer
PEP 461 - Adding % formatting to bytes and bytearray
----------------------------------------------------
This PEP proposes adding % formatting operations similar to Python 2's ``str``
type to :class:`bytes` and :class:`bytearray`.
Examples::
>>> b'Hello %s!' % b'World'
b'Hello World!'
>>> b'x=%i y=%f' % (1, 2.5)
b'x=1 y=2.500000'
Unicode is not allowed for ``%s``, but it is accepted by ``%a`` (equivalent of
``repr(obj).encode('ascii', 'backslashreplace')``)::
>>> b'Hello %s!' % 'World'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: %b requires bytes, or an object that implements __bytes__, not 'str'
>>> b'price: %a' % '10€'
b"price: '10\\u20ac'"
.. seealso::
:pep:`461` -- Adding % formatting to bytes and bytearray
PEP 465 - A dedicated infix operator for matrix multiplication
--------------------------------------------------------------
This PEP proposes a new binary operator to be used for matrix multiplication,
called ``@``. (Mnemonic: ``@`` is ``*`` for mATrices.)
.. seealso::
:pep:`465` -- A dedicated infix operator for matrix multiplication
PEP 471 - os.scandir() function -- a better and faster directory iterator
-------------------------------------------------------------------------
...
...
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